diff options
| author | Jack Koenig | 2016-10-07 17:04:32 -0500 |
|---|---|---|
| committer | Donggyu | 2016-10-07 15:04:32 -0700 |
| commit | 515f29f5993abb399db43b04e9a63c0fdf347ecc (patch) | |
| tree | 5cb7376330f40b7556388c954f5cc379fa4e4a2c /src/test/resources/features | |
| parent | 13646949bb5f9a24f45c7510072a6f39cfdaa54c (diff) | |
Add test for Firrtl mems with no ports (#327)
Diffstat (limited to 'src/test/resources/features')
| -rw-r--r-- | src/test/resources/features/ZeroPortMem.fir | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/test/resources/features/ZeroPortMem.fir b/src/test/resources/features/ZeroPortMem.fir new file mode 100644 index 00000000..13b13720 --- /dev/null +++ b/src/test/resources/features/ZeroPortMem.fir @@ -0,0 +1,23 @@ + +circuit ZeroPortMem : + module ZeroPortMem : + input clk : Clock + input reset : UInt<1> + + mem mymem : + data-type => UInt<32> + depth => 128 + read-latency => 0 + write-latency => 1 + read-under-write => undefined + + wire foo : UInt<32> + foo <= UInt<32>("hdeadbeef") + + when not(reset) : + when eq(foo, UInt<32>("hdeadbeef")) : + stop(clk, UInt(1), 0) ; Success ! + else : + printf(clk, UInt(1), "Assertion failed!\n") + stop(clk, UInt(1), 1) ; Failure! + |
