blob: 1ae4f68c860e89c13abbdcc5ee2c0fd50193ce1a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
; SPDX-License-Identifier: Apache-2.0
circuit ZeroPortMem :
module ZeroPortMem :
input clock : 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(clock, UInt(1), 0) ; Success !
else :
printf(clock, UInt(1), "Assertion failed!\n")
stop(clock, UInt(1), 1) ; Failure!
|