Skip to content

Commit e1aec97

Browse files
author
Dmitry Ryabikov
committed
Simulation in vivado with hdlmake working
1 parent 709995b commit e1aec97

22 files changed

+565
-24
lines changed

.gitignore

+6-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,14 @@ syn/*
22
!Manifest.py
33
!add_files.tcl
44
!transceiver.xdc
5-
top/sim/*
5+
top/sim/modelsim/*
6+
!Manifest.py
7+
!sin_value.dat
8+
!neg_sin_value.dat
9+
!vsim.do
10+
top/sim/vivado/*
611
!Manifest.py
712
!sin_value.dat
813
!neg_sin_value.dat
9-
!sin_value.m
1014
platform/xilinx/clk_wiz/*
1115
!clk_wiz.xci

modules/bpsk/bpsk_demodulator.v

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
`timescale 1ps / 1ps
2-
31
module bpsk_demodulator #(
42
parameter SAMPLE_NUMBER = 256,
53
parameter SAMPLE_WIDTH = 12,

modules/bpsk/bpsk_modulator.v

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
`timescale 1ps / 1ps
2-
31
module bpsk_modulator #(
42
parameter SAMPLE_NUMBER = 256,
53
parameter SAMPLE_WIDTH = 12,

modules/bpsk/bpsk_top.v

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
`default_nettype none
2-
`timescale 1ps / 1ps
32

43
module bpsk_top #(
54
parameter SAMPLE_NUMBER = 256,

modules/bpsk/sin_generator.v

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
`timescale 1ps / 1ps
2-
31
module sin_generator #(
42
parameter SAMPLE_NUMBER = 256,
53
parameter SAMPLE_WIDTH = 12

modules/hamming/hamming_decoder.v

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
`timescale 1ps / 1ps
2-
31
module hamming_decoder (
42
input wire clk,
53
input wire rst_n,

modules/hamming/hamming_encoder.v

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
`timescale 1ps / 1ps
2-
31
module hamming_encoder (
42
input wire clk,
53
input wire rst_n,

modules/hamming/humming_coder12_8.v

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
`default_nettype none
2-
`timescale 1ps / 1ps
32

43
module humming_coder12_8 (
54
input wire clk,

platform/xilinx/clk_wiz/clk_wiz.xci

+7
Original file line numberDiff line numberDiff line change
@@ -685,17 +685,24 @@
685685
<xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.CLKOUT1_PHASE_ERROR" xilinx:valueSource="user"/>
686686
<xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.CLKOUT1_REQUESTED_OUT_FREQ" xilinx:valueSource="user"/>
687687
<xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.CLKOUT2_DRIVES" xilinx:valueSource="user"/>
688+
<xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.CLKOUT2_JITTER" xilinx:valueSource="user"/>
689+
<xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.CLKOUT2_PHASE_ERROR" xilinx:valueSource="user"/>
690+
<xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.CLKOUT2_REQUESTED_OUT_FREQ" xilinx:valueSource="user"/>
691+
<xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.CLKOUT2_USED" xilinx:valueSource="user"/>
688692
<xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.CLKOUT3_DRIVES" xilinx:valueSource="user"/>
689693
<xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.CLKOUT4_DRIVES" xilinx:valueSource="user"/>
690694
<xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.CLKOUT5_DRIVES" xilinx:valueSource="user"/>
691695
<xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.CLKOUT6_DRIVES" xilinx:valueSource="user"/>
692696
<xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.CLKOUT7_DRIVES" xilinx:valueSource="user"/>
693697
<xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.CLK_OUT1_PORT" xilinx:valueSource="user"/>
698+
<xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.CLK_OUT2_PORT" xilinx:valueSource="user"/>
694699
<xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.MMCM_BANDWIDTH" xilinx:valueSource="user"/>
695700
<xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.MMCM_CLKFBOUT_MULT_F" xilinx:valueSource="user"/>
696701
<xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.MMCM_CLKOUT0_DIVIDE_F" xilinx:valueSource="user"/>
702+
<xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.MMCM_CLKOUT1_DIVIDE" xilinx:valueSource="user"/>
697703
<xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.MMCM_COMPENSATION" xilinx:valueSource="user"/>
698704
<xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.MMCM_DIVCLK_DIVIDE" xilinx:valueSource="user"/>
705+
<xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.NUM_OUT_CLKS" xilinx:valueSource="user"/>
699706
<xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.PRIMARY_PORT" xilinx:valueSource="user"/>
700707
<xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.PRIMITIVE" xilinx:valueSource="user"/>
701708
<xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.USE_LOCKED" xilinx:valueSource="user"/>

syn/add_files.tcl

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ open_project transceiver.xpr
33
read_ip ../platform/xilinx/clk_wiz/clk_wiz.xci
44
generate_target all [get_files *clk_wiz.xci]
55

6-
read_mem ../top/sim/sin_value.dat
6+
read_mem ../top/sim/modelsim/sin_value.dat
77

8-
read_mem ../top/sim/neg_sin_value.dat
8+
read_mem ../top/sim/modelsim/neg_sin_value.dat
99

1010
close_project
1111
exit

top/sim/iverilog/Manifest.py

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
action = "simulation"
2+
sim_tool = "iverilog"
3+
sim_top = "transceiver_tb"
4+
5+
sim_post_cmd = "vvp tranceiver_tb.vvp; gtkwave out.vcd"
6+
7+
modules = {
8+
"local" : [
9+
"../../tb/",
10+
],
11+
}

top/sim/Manifest.py renamed to top/sim/modelsim/Manifest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66

77
modules = {
88
"local" : [
9-
"../tb/",
9+
"../../tb/",
1010
],
1111
}
File renamed without changes.
File renamed without changes.

top/sim/modelsim/vsim.do

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
vcd file transceiver_tb.vcd;
2+
vcd add -r /*;
3+
add wave *
4+
run 25000ps;
5+
view wave;

top/sim/vivado/Manifest.py

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
action = "simulation"
2+
sim_tool = "vivado_sim"
3+
sim_top = "transceiver_tb"
4+
5+
sim_post_cmd = "xsim %s -gui" % sim_top
6+
7+
modules = {
8+
"local" : [
9+
"../../tb/",
10+
],
11+
}

top/sim/vivado/neg_sin_value.dat

+256
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,256 @@
1+
100000000000
2+
011111001110
3+
011110011100
4+
011101101001
5+
011100110111
6+
011100000101
7+
011011010100
8+
011010100010
9+
011001110001
10+
011000111111
11+
011000001110
12+
010111011110
13+
010110101110
14+
010101111110
15+
010101001110
16+
010100011111
17+
010011110000
18+
010011000010
19+
010010010101
20+
010001100111
21+
010000111011
22+
010000001111
23+
001111100011
24+
001110111001
25+
001110001110
26+
001101100101
27+
001100111100
28+
001100010100
29+
001011101101
30+
001011000111
31+
001010100001
32+
001001111100
33+
001001011000
34+
001000110101
35+
001000010011
36+
000111110010
37+
000111010001
38+
000110110010
39+
000110010011
40+
000101110110
41+
000101011010
42+
000100111110
43+
000100100100
44+
000100001010
45+
000011110010
46+
000011011011
47+
000011000101
48+
000010110000
49+
000010011100
50+
000010001010
51+
000001111000
52+
000001101000
53+
000001011001
54+
000001001011
55+
000000111110
56+
000000110010
57+
000000101000
58+
000000011111
59+
000000010111
60+
000000010000
61+
000000001010
62+
000000000110
63+
000000000011
64+
000000000001
65+
000000000000
66+
000000000001
67+
000000000011
68+
000000000110
69+
000000001010
70+
000000010000
71+
000000010111
72+
000000011111
73+
000000101000
74+
000000110010
75+
000000111110
76+
000001001011
77+
000001011001
78+
000001101000
79+
000001111000
80+
000010001010
81+
000010011100
82+
000010110000
83+
000011000101
84+
000011011011
85+
000011110010
86+
000100001010
87+
000100100100
88+
000100111110
89+
000101011010
90+
000101110110
91+
000110010011
92+
000110110010
93+
000111010001
94+
000111110010
95+
001000010011
96+
001000110101
97+
001001011000
98+
001001111100
99+
001010100001
100+
001011000111
101+
001011101101
102+
001100010100
103+
001100111100
104+
001101100101
105+
001110001110
106+
001110111001
107+
001111100011
108+
010000001111
109+
010000111011
110+
010001100111
111+
010010010101
112+
010011000010
113+
010011110000
114+
010100011111
115+
010101001110
116+
010101111110
117+
010110101110
118+
010111011110
119+
011000001110
120+
011000111111
121+
011001110001
122+
011010100010
123+
011011010100
124+
011100000101
125+
011100110111
126+
011101101001
127+
011110011100
128+
011111001110
129+
100000000000
130+
100000110010
131+
100001100100
132+
100010010111
133+
100011001001
134+
100011111011
135+
100100101100
136+
100101011110
137+
100110001111
138+
100111000001
139+
100111110010
140+
101000100010
141+
101001010010
142+
101010000010
143+
101010110010
144+
101011100001
145+
101100010000
146+
101100111110
147+
101101101011
148+
101110011001
149+
101111000101
150+
101111110001
151+
110000011101
152+
110001000111
153+
110001110010
154+
110010011011
155+
110011000100
156+
110011101100
157+
110100010011
158+
110100111001
159+
110101011111
160+
110110000100
161+
110110101000
162+
110111001011
163+
110111101101
164+
111000001110
165+
111000101111
166+
111001001110
167+
111001101101
168+
111010001010
169+
111010100110
170+
111011000010
171+
111011011100
172+
111011110110
173+
111100001110
174+
111100100101
175+
111100111011
176+
111101010000
177+
111101100100
178+
111101110110
179+
111110001000
180+
111110011000
181+
111110100111
182+
111110110101
183+
111111000010
184+
111111001110
185+
111111011000
186+
111111100001
187+
111111101001
188+
111111110000
189+
111111110110
190+
111111111010
191+
111111111101
192+
111111111111
193+
111111111111
194+
111111111111
195+
111111111101
196+
111111111010
197+
111111110110
198+
111111110000
199+
111111101001
200+
111111100001
201+
111111011000
202+
111111001110
203+
111111000010
204+
111110110101
205+
111110100111
206+
111110011000
207+
111110001000
208+
111101110110
209+
111101100100
210+
111101010000
211+
111100111011
212+
111100100101
213+
111100001110
214+
111011110110
215+
111011011100
216+
111011000010
217+
111010100110
218+
111010001010
219+
111001101101
220+
111001001110
221+
111000101111
222+
111000001110
223+
110111101101
224+
110111001011
225+
110110101000
226+
110110000100
227+
110101011111
228+
110100111001
229+
110100010011
230+
110011101100
231+
110011000100
232+
110010011011
233+
110001110010
234+
110001000111
235+
110000011101
236+
101111110001
237+
101111000101
238+
101110011001
239+
101101101011
240+
101100111110
241+
101100010000
242+
101011100001
243+
101010110010
244+
101010000010
245+
101001010010
246+
101000100010
247+
100111110010
248+
100111000001
249+
100110001111
250+
100101011110
251+
100100101100
252+
100011111011
253+
100011001001
254+
100010010111
255+
100001100100
256+
100000110010

0 commit comments

Comments
 (0)