Skip to content

Commit cf8831f

Browse files
authored
Merge pull request #134 from os-fpga/fail_sim_1.5.8
Fail sim 1.5.8
2 parents a66051e + 69800cf commit cf8831f

File tree

8 files changed

+647
-90
lines changed

8 files changed

+647
-90
lines changed

sim_models/tb/MIPI_TX_tb.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,4 +151,4 @@ module MIPI_TX_tb;
151151
$dumpfile("waves.vcd");
152152
$dumpvars;
153153
end
154-
endmodule
154+
endmodule
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
2+
module SOC_FPGA_INTF_IRQ_tb;
3+
reg IRQ_CLK;
4+
reg IRQ_RST_N;
5+
reg [3:0] IRQ_SRC;
6+
wire [3:0] IRQ_SET;
7+
8+
reg [3:0] irq_src;
9+
10+
SOC_FPGA_INTF_IRQ soc_fpga_intf_irq(
11+
.IRQ_SRC(IRQ_SRC),
12+
.IRQ_SET(IRQ_SET),
13+
.IRQ_CLK(IRQ_CLK),
14+
.IRQ_RST_N(IRQ_RST_N)
15+
);
16+
17+
initial begin
18+
//generating clock
19+
IRQ_CLK = 0;
20+
forever #5 IRQ_CLK = ~IRQ_CLK;
21+
end
22+
23+
initial begin
24+
IRQ_SRC = 0;
25+
IRQ_RST_N = 0;
26+
27+
repeat(2) @(posedge IRQ_CLK);
28+
IRQ_RST_N = 1;
29+
30+
for (int i=0; i<10; i++) begin
31+
IRQ_SRC = $random();
32+
@(posedge IRQ_CLK);
33+
end
34+
35+
$finish;
36+
37+
end
38+
39+
always @(posedge IRQ_CLK) irq_src <= IRQ_SRC;
40+
41+
initial begin
42+
forever begin
43+
if(IRQ_RST_N)
44+
if (IRQ_SET == irq_src)
45+
$info("True IRQ_SET");
46+
else $error("False IRQ_SET %0d , IRQ_SRC %0d ", IRQ_SET ,irq_src );
47+
@(posedge IRQ_CLK);
48+
end
49+
end
50+
51+
endmodule
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
`timescale 1ns/1ps
2+
3+
module SOC_FPGA_INTF_JTAG_tb;
4+
5+
// Inputs
6+
reg BOOT_JTAG_TCK;
7+
reg BOOT_JTAG_TDO;
8+
reg BOOT_JTAG_EN;
9+
10+
// Outputs
11+
wire BOOT_JTAG_TDI;
12+
wire BOOT_JTAG_TMS;
13+
wire BOOT_JTAG_TRSTN;
14+
15+
reg [3:0] tdo;
16+
17+
SOC_FPGA_INTF_JTAG dut (
18+
.BOOT_JTAG_TCK(BOOT_JTAG_TCK),
19+
.BOOT_JTAG_TDI(BOOT_JTAG_TDI),
20+
.BOOT_JTAG_TDO(BOOT_JTAG_TDO),
21+
.BOOT_JTAG_TMS(BOOT_JTAG_TMS),
22+
.BOOT_JTAG_TRSTN(BOOT_JTAG_TRSTN),
23+
.BOOT_JTAG_EN(BOOT_JTAG_EN)
24+
);
25+
26+
27+
initial begin
28+
BOOT_JTAG_TCK = 0;
29+
forever #5 BOOT_JTAG_TCK = ~BOOT_JTAG_TCK;
30+
end
31+
32+
33+
// Stimulus
34+
initial begin
35+
36+
BOOT_JTAG_TDO = 1'b0;
37+
BOOT_JTAG_EN = 1'b0;
38+
39+
#10;
40+
41+
for (int i=0; i<10; i++) begin
42+
BOOT_JTAG_TDO = ~BOOT_JTAG_TDO;
43+
@(posedge BOOT_JTAG_TCK);
44+
end
45+
46+
#10;
47+
48+
BOOT_JTAG_EN = 1'b1;
49+
50+
for (int i=0; i<10; i++) begin
51+
BOOT_JTAG_TDO = ~BOOT_JTAG_TDO;
52+
@(posedge BOOT_JTAG_TCK);
53+
end
54+
55+
#10;
56+
$finish;
57+
end
58+
59+
always @(posedge BOOT_JTAG_TCK) tdo <= BOOT_JTAG_TDO;
60+
61+
initial begin
62+
forever begin
63+
if(BOOT_JTAG_TRSTN && BOOT_JTAG_TMS)
64+
if (BOOT_JTAG_TDI == tdo)
65+
$info("True BOOT_JTAG_TDI");
66+
else $error("False BOOT_JTAG_TDI %0d , BOOT_JTAG_TDO %0d ", BOOT_JTAG_TDI ,tdo );
67+
@(posedge BOOT_JTAG_TCK);
68+
end
69+
end
70+
71+
endmodule

sim_models/verilog/DLY_SEL_DCODER.v

Lines changed: 0 additions & 89 deletions
This file was deleted.
Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
# Periphery Primitives Parameters and Properties (P4)
2+
#
3+
# This file contains the list of Verilog parameters and SDC properties that are
4+
# allowed for periphery primitives.
5+
#
6+
# See https://rapidsilicon.atlassian.net/wiki/spaces/RS/pages/214368265/Periphery+Primitive+Parameters+and+Properties+Definitions+P4DEF for more details
7+
#
8+
# The name needs to match the filename root
9+
# name: <primitive name>
10+
# desc: <optional description>
11+
#
12+
# ports:
13+
# <portname>:
14+
# dir: <input, output, inout>
15+
# desc: <optional description>
16+
# <portname>:
17+
# dir: <input, output, inout>
18+
# desc: <optional description>
19+
#
20+
# # set as Verilog parameter
21+
# parameters:
22+
# <parameter_name>:
23+
# desc: <description>
24+
# values:
25+
# - <enum_name>
26+
# - <enum_name>
27+
# <parameter_name>:
28+
# desc: <description>
29+
# values:
30+
# - <enum_name>
31+
# - <enum_name>
32+
#
33+
# # set in SDC or by synthesis attribute
34+
# properties:
35+
# <property_name>:
36+
# desc: <description>
37+
# values:
38+
# - <enum_name>
39+
# - <enum_name>
40+
# <property_name>:
41+
# desc: <description>
42+
# - <enum_name>
43+
# - <enum_name>
44+
#
45+
# primitive name should match the filename root.
46+
name: DLY_SEL_DECODER
47+
desc: Address Decoder
48+
category: periphery
49+
timescale: 1ps/1ps
50+
51+
ports:
52+
DLY_LOAD:
53+
dir: input
54+
desc: Delay load input
55+
DLY_ADJ:
56+
dir: input
57+
desc: Delay adjust input
58+
DLY_INCDEC:
59+
dir: input
60+
desc: Delay increment / decrement input
61+
DLY_ADDR[4:0]:
62+
dir: input
63+
desc: Input Address
64+
DLY0_CNTRL[2:0]:
65+
dir: output
66+
desc: Output Bus
67+
type: reg
68+
DLY1_CNTRL[2:0]:
69+
dir: output
70+
desc: Output Bus
71+
type: reg
72+
DLY2_CNTRL[2:0]:
73+
dir: output
74+
desc: Output Bus
75+
type: reg
76+
DLY3_CNTRL[2:0]:
77+
dir: output
78+
desc: Output Bus
79+
type: reg
80+
DLY4_CNTRL[2:0]:
81+
dir: output
82+
desc: Output Bus
83+
type: reg
84+
DLY5_CNTRL[2:0]:
85+
dir: output
86+
desc: Output Bus
87+
type: reg
88+
DLY6_CNTRL[2:0]:
89+
dir: output
90+
desc: Output Bus
91+
type: reg
92+
DLY7_CNTRL[2:0]:
93+
dir: output
94+
desc: Output Bus
95+
type: reg
96+
DLY8_CNTRL[2:0]:
97+
dir: output
98+
desc: Output Bus
99+
type: reg
100+
DLY9_CNTRL[2:0]:
101+
dir: output
102+
desc: Output Bus
103+
type: reg
104+
DLY10_CNTRL[2:0]:
105+
dir: output
106+
desc: Output Bus
107+
type: reg
108+
DLY11_CNTRL[2:0]:
109+
dir: output
110+
desc: Output Bus
111+
type: reg
112+
DLY12_CNTRL[2:0]:
113+
dir: output
114+
desc: Output Bus
115+
type: reg
116+
DLY13_CNTRL[2:0]:
117+
dir: output
118+
desc: Output Bus
119+
type: reg
120+
DLY14_CNTRL[2:0]:
121+
dir: output
122+
desc: Output Bus
123+
type: reg
124+
DLY15_CNTRL[2:0]:
125+
dir: output
126+
desc: Output Bus
127+
type: reg
128+
DLY16_CNTRL[2:0]:
129+
dir: output
130+
desc: Output Bus
131+
type: reg
132+
DLY17_CNTRL[2:0]:
133+
dir: output
134+
desc: Output Bus
135+
type: reg
136+
DLY18_CNTRL[2:0]:
137+
dir: output
138+
desc: Output Bus
139+
type: reg
140+
DLY19_CNTRL[2:0]:
141+
dir: output
142+
desc: Output Bus
143+
type: reg
144+

0 commit comments

Comments
 (0)