Skip to content

Commit

Permalink
test: SDF parsing tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ondrej Ille authored and ondrej.ille committed Oct 24, 2023
1 parent ed645e0 commit f2510c9
Show file tree
Hide file tree
Showing 17 changed files with 790 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/Makemodule.am
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ bin_unit_test_SOURCES = \
test/test_jit.c \
test/test_model.c \
test/test_psl.c \
test/test_sdf.c \
test/test_charset.c \
test/test_dump.c \
test/test_driver.c
Expand Down
7 changes: 7 additions & 0 deletions test/sdf/parse1.sdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
(DELAYFILE
(SDFVERSION "4.0")
(CELL
(CELLTYPE "AND2")
(INSTANCE I1)
)
)
14 changes: 14 additions & 0 deletions test/sdf/parse10.sdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
(DELAYFILE
(SDFVERSION "4.0")
(CELL
(CELLTYPE "AND2")
(INSTANCE B2.C2)
(DELAY
(ABSOLUTE
(IOPATH (posedge clk_a) x_q (0))
(IOPATH (negedge clk_b[17]) y_q (0))
(IOPATH (negedge clk_c[2:3]) z_q[1:2] (0))
)
)
)
)
14 changes: 14 additions & 0 deletions test/sdf/parse11.sdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
(DELAYFILE
(SDFVERSION "4.0")
(CELL
(CELLTYPE "AND2")
(INSTANCE B2.C2)
(DELAY
(ABSOLUTE
(IOPATH a b (17) )
(IOPATH c d ((2.3) (1.2)) )
(IOPATH e f ((0) (1) (2.5)) )
)
)
)
)
13 changes: 13 additions & 0 deletions test/sdf/parse12.sdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
(DELAYFILE
(SDFVERSION "4.0")
(CELL
(CELLTYPE "AND2")
(INSTANCE B2.C2)
(DELAY
(ABSOLUTE
(IOPATH g h (1:2.4:3) ((:4.7:5) (6.1::7) (8.9:9:)) ((10.00007::) (:11.500:) (::12.99)) )
(IOPATH i j () () () () () () () () () () () () ())
)
)
)
)
13 changes: 13 additions & 0 deletions test/sdf/parse13.sdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
(DELAYFILE
(SDFVERSION "Fancy SDF super version 1.0 followed by 2.1 that shall be ignored")
(DATE "Dec 17, 1991 14:49:48")
(DESIGN "testchip")
(VENDOR "Big Chips Inc.")
(PROGRAM "New VHDL Compiler")
(PROGRAM "Duplicit program entry")
(VERSION "1.10.2")
(CELL
(CELLTYPE "AND2")
(INSTANCE I1)
)
)
17 changes: 17 additions & 0 deletions test/sdf/parse14.sdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
(DELAYFILE
(SDFVERSION "4.0")
(CELL
(CELLTYPE "DFF")
(INSTANCE cache.mem3.bndrx.I103)
(LABEL
(ABSOLUTE
(TCLK_Q (7.54:12.14:19.78) (6.97:13.66:18.47))
(TSETUP_D_CLK (3:4:5.6))
)
(INCREMENT
(TCLK_QB (8.16:13.74:20.25) (7.63:14.83:21.42))
(THOLD_D_CLK (4:5.6:7))
)
)
)
)
7 changes: 7 additions & 0 deletions test/sdf/parse2.sdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
(DELAYFILE
(SDFVERSION "FOR_SURE_INVALID_SDF_VERSION")
(CELL
(CELLTYPE "AND2")
(INSTANCE I1)
)
)
12 changes: 12 additions & 0 deletions test/sdf/parse3.sdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
(DELAYFILE
(SDFVERSION "Fancy SDF super version 1.0 followed by 2.1 that shall be ignored")
(DESIGN "testchip")
(DATE "Dec 17, 1991 14:49:48")
(VENDOR "Big Chips Inc.")
(PROGRAM "New VHDL Compiler")
(VERSION "1.10.2")
(CELL
(CELLTYPE "AND2")
(INSTANCE I1)
)
)
8 changes: 8 additions & 0 deletions test/sdf/parse4.sdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
(DELAYFILE
(SDFVERSION "IEEE 2.1")
(DIVIDER .)
(CELL
(CELLTYPE "AND2")
(INSTANCE TOP/I2)
)
)
10 changes: 10 additions & 0 deletions test/sdf/parse5.sdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
(DELAYFILE
(SDFVERSION "IEEE 3.0")
(VOLTAGE 1.08:1.2:1.32)
(PROCESS "worst")
(TEMPERATURE -40:25:125)
(CELL
(CELLTYPE "AND2")
(INSTANCE TOP.I1)
)
)
8 changes: 8 additions & 0 deletions test/sdf/parse6.sdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
(DELAYFILE
(SDFVERSION "IEEE 3.0")
(TIMESCALE 10ns)
(CELL
(CELLTYPE "AND2")
(INSTANCE TOP.I1)
)
)
7 changes: 7 additions & 0 deletions test/sdf/parse7.sdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
(DELAYFILE
(SDFVERSION "4.0")
(CELL
(CELLTYPE "AND2")
(INSTANCE *)
)
)
19 changes: 19 additions & 0 deletions test/sdf/parse8.sdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
(DELAYFILE
(SDFVERSION "4.0")
(CELL
(CELLTYPE "AND2")
(INSTANCE TOP.DUT.MODULE.A)
(DELAY
(ABSOLUTE
(IOPATH a b (1))
(PORT c (2))
(INTERCONNECT d e (3))
)
(INCREMENT
(NETDELAY f (4))
(DEVICE g (5))
(DEVICE (6))
)
)
)
)
14 changes: 14 additions & 0 deletions test/sdf/parse9.sdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
(DELAYFILE
(SDFVERSION "4.0")
(CELL
(CELLTYPE "AND2")
(INSTANCE B2.C2)
(DELAY
(ABSOLUTE
(IOPATH a x (0))
(IOPATH top.dut.b[897] top.dut.x[921] (0))
(IOPATH b[5:2] x[9:6] (0))
)
)
)
)
Loading

0 comments on commit f2510c9

Please sign in to comment.