mirror of
https://github.com/YosysHQ/yosys
synced 2025-08-31 07:14:55 +00:00
dfflegalize: Add tests targetting aldff.
This commit is contained in:
parent
0a0df8d38c
commit
54c79af64f
7 changed files with 320 additions and 7 deletions
|
@ -39,6 +39,8 @@ design -save orig
|
|||
flatten
|
||||
equiv_opt -assert -multiclock dfflegalize -cell $_DFF_PP0_ x
|
||||
equiv_opt -assert -multiclock dfflegalize -cell $_DFFE_PP0P_ x
|
||||
equiv_opt -assert -multiclock dfflegalize -cell $_ALDFF_PP_ x
|
||||
equiv_opt -assert -multiclock dfflegalize -cell $_ALDFFE_PPP_ x
|
||||
equiv_opt -assert -multiclock dfflegalize -cell $_DFFSR_PPP_ x
|
||||
equiv_opt -assert -multiclock dfflegalize -cell $_DFFSRE_PPPP_ x
|
||||
|
||||
|
@ -73,6 +75,36 @@ select -assert-count 14 t:$_DFFE_PP0P_
|
|||
select -assert-none t:$_DFFE_PP0P_ t:$_NOT_ top/* %% %n t:* %i
|
||||
|
||||
|
||||
# Convert everything to ALDFFs.
|
||||
|
||||
design -load orig
|
||||
dfflegalize -cell $_ALDFF_PP_ x
|
||||
|
||||
select -assert-count 2 adff0/t:$_NOT_
|
||||
select -assert-count 2 adff1/t:$_NOT_
|
||||
select -assert-count 2 adffe0/t:$_NOT_
|
||||
select -assert-count 2 adffe1/t:$_NOT_
|
||||
select -assert-count 0 adff0/t:$_MUX_
|
||||
select -assert-count 0 adff1/t:$_MUX_
|
||||
select -assert-count 4 adffe0/t:$_MUX_
|
||||
select -assert-count 4 adffe1/t:$_MUX_
|
||||
select -assert-count 14 t:$_ALDFF_PP_
|
||||
select -assert-none t:$_ALDFF_PP_ t:$_MUX_ t:$_NOT_ top/* %% %n t:* %i
|
||||
|
||||
|
||||
# Convert everything to ALDFFEs.
|
||||
|
||||
design -load orig
|
||||
dfflegalize -cell $_ALDFFE_PPP_ x
|
||||
|
||||
select -assert-count 2 adff0/t:$_NOT_
|
||||
select -assert-count 2 adff1/t:$_NOT_
|
||||
select -assert-count 3 adffe0/t:$_NOT_
|
||||
select -assert-count 3 adffe1/t:$_NOT_
|
||||
select -assert-count 14 t:$_ALDFFE_PPP_
|
||||
select -assert-none t:$_ALDFFE_PPP_ t:$_NOT_ top/* %% %n t:* %i
|
||||
|
||||
|
||||
# Convert everything to DFFSRs.
|
||||
|
||||
design -load orig
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue