Improve MISTRAL_FF specify rules

Co-authored-by: Eddie Hung <eddie@fpgeh.com>
This commit is contained in:
Dan Ravensloft 2020-05-28 11:33:19 +01:00 committed by Marcelina Kościelnicka
parent 52fbaeca07
commit c6765443fd
2 changed files with 6 additions and 6 deletions

View File

@ -79,10 +79,9 @@ module MISTRAL_FF(
);
specify
if (ENA) (posedge CLK => (Q : DATAIN)) = `SYNCPATH;
if (ENA) (posedge CLK => (Q : SCLR)) = `SYNCPATH;
if (ENA) (posedge CLK => (Q : SLOAD)) = `SYNCPATH;
if (ENA) (posedge CLK => (Q : SDATA)) = `SYNCPATH;
if (ENA && ACLR !== 1'b0 && !SCLR && !SLOAD) (posedge CLK => (Q : DATAIN)) = `SYNCPATH;
if (ENA && SCLR) (posedge CLK => (Q : 1'b0)) = `SYNCPATH;
if (ENA && !SCLR && SLOAD) (posedge CLK => (Q : SDATA)) = `SYNCPATH;
$setup(DATAIN, posedge CLK, `SYNCSETUP);
$setup(ENA, posedge CLK, `SYNCSETUP);
@ -90,7 +89,7 @@ specify
$setup(SLOAD, posedge CLK, `SYNCSETUP);
$setup(SDATA, posedge CLK, `SYNCSETUP);
if (!ACLR) (ACLR => Q) = `COMBPATH;
if (ACLR === 1'b0) (ACLR => Q) = `COMBPATH;
endspecify
initial begin

View File

@ -13,7 +13,8 @@ cd fsm # Constrain all select calls below inside the top module
select -assert-count 6 t:MISTRAL_FF
select -assert-max 2 t:MISTRAL_ALUT2 # Clang returns 2, GCC returns 1
select -assert-count 1 t:MISTRAL_ALUT3
select -assert-max 1 t:MISTRAL_ALUT4 # Clang returns 0, GCC returns 1
select -assert-max 5 t:MISTRAL_ALUT5 # Clang returns 5, GCC returns 4
select -assert-max 2 t:MISTRAL_ALUT6 # Clang returns 1, GCC returns 2
select -assert-none t:MISTRAL_FF t:MISTRAL_ALUT2 t:MISTRAL_ALUT4 t:MISTRAL_ALUT5 t:MISTRAL_ALUT6 %% t:* %D
select -assert-none t:MISTRAL_FF t:MISTRAL_ALUT2 t:MISTRAL_ALUT3 t:MISTRAL_ALUT4 t:MISTRAL_ALUT5 t:MISTRAL_ALUT6 %% t:* %D