aboutsummaryrefslogtreecommitdiffstats
path: root/tests/arch
diff options
context:
space:
mode:
authorMarcelina Koƛcielnicka <mwk@0x04.net>2020-07-03 00:23:18 +0200
committerMarcelina Koƛcielnicka <mwk@0x04.net>2020-07-06 12:27:46 +0200
commitc73ebeb90efcce503081db4322b283383247fe99 (patch)
tree0569d4d7a59e382107703a0eb369bb18259161f4 /tests/arch
parent09ecb9b2cf3ab76841d30712bf70dafc6d47ef67 (diff)
downloadyosys-c73ebeb90efcce503081db4322b283383247fe99.tar.gz
yosys-c73ebeb90efcce503081db4322b283383247fe99.tar.bz2
yosys-c73ebeb90efcce503081db4322b283383247fe99.zip
gowin: Use dfflegalize.
Diffstat (limited to 'tests/arch')
-rw-r--r--tests/arch/gowin/init-error.ys5
-rw-r--r--tests/arch/gowin/init.ys16
2 files changed, 8 insertions, 13 deletions
diff --git a/tests/arch/gowin/init-error.ys b/tests/arch/gowin/init-error.ys
new file mode 100644
index 000000000..de3813d6f
--- /dev/null
+++ b/tests/arch/gowin/init-error.ys
@@ -0,0 +1,5 @@
+read_verilog init.v
+chparam -set INIT 0 myDFF*P*
+hierarchy -top myDFFP
+logger -expect error "unsupported initial value and async reset value combination" 1
+synth_gowin
diff --git a/tests/arch/gowin/init.ys b/tests/arch/gowin/init.ys
index 4d8e442ac..88e88c15a 100644
--- a/tests/arch/gowin/init.ys
+++ b/tests/arch/gowin/init.ys
@@ -35,10 +35,10 @@ design -load read
# these should synth to a flop with reset
chparam -set INIT 1 myDFF myDFFN myDFFE myDFFNE
-# async should give a warning
+# async would give an error
# sync should synth to a mux
-chparam -set INIT 0 myDFF*S* myDFF*P*
-chparam -set INIT 1 myDFF*R* myDFF*C*
+chparam -set INIT 0 myDFF*S*
+chparam -set INIT 1 myDFF*R*
proc
flatten
@@ -66,13 +66,3 @@ select -assert-count 0 t:DFFRE
select -assert-count 2 t:DFFS
select -assert-count 2 t:DFFSE
select -assert-count 12 t:LUT2
-
-# Remove all whiteboxes so we don't inadvertently
-# count init attributes inside them
-# Should be superseded by https://github.com/YosysHQ/yosys/pull/1949
-delete A:whitebox=1
-
-# check the expected leftover init values
-# this would happen if your reset value is not the initial value
-# which would be weird
-select -assert-count 8 a:init