Skip to content

Commit 63d29e3

Browse files
committed
README
1 parent b0ddc86 commit 63d29e3

File tree

2 files changed

+28
-38
lines changed

2 files changed

+28
-38
lines changed

README.md

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -211,50 +211,45 @@ python hello_led.py
211211
You will have a complete Verilog HDL source code named 'tmp.v' as below, which is generated by the source code generator.
212212

213213
```verilog
214-
module test #
215-
(
216-
parameter WIDTH = 8
217-
)
214+
module test
218215
(
219216
220217
);
221218
222-
reg CLK;
223-
reg RST;
224-
wire [WIDTH-1:0] LED;
219+
localparam uut_WIDTH = 8;
220+
reg uut_CLK;
221+
reg uut_RST;
222+
wire [uut_WIDTH-1:0] uut_LED;
225223
226224
blinkled
227-
#(
228-
.WIDTH(WIDTH)
229-
)
230225
uut
231226
(
232-
.CLK(CLK),
233-
.RST(RST),
234-
.LED(LED)
227+
.CLK(uut_CLK),
228+
.RST(uut_RST),
229+
.LED(uut_LED)
235230
);
236231
237232
238233
initial begin
239234
$dumpfile("uut.vcd");
240-
$dumpvars(0, uut, CLK, RST, LED);
235+
$dumpvars(0, uut, uut_CLK, uut_RST, uut_LED);
241236
end
242237
243238
244239
initial begin
245-
CLK = 0;
240+
uut_CLK = 0;
246241
forever begin
247-
#5 CLK = !CLK;
242+
#5 uut_CLK = !uut_CLK;
248243
end
249244
end
250245
251246
252247
initial begin
253-
RST = 0;
248+
uut_RST = 0;
254249
#100;
255-
RST = 1;
250+
uut_RST = 1;
256251
#100;
257-
RST = 0;
252+
uut_RST = 0;
258253
#100000;
259254
$finish;
260255
end

README.rst

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -236,50 +236,45 @@ which is generated by the source code generator.
236236

237237
.. code:: verilog
238238
239-
module test #
240-
(
241-
parameter WIDTH = 8
242-
)
239+
module test
243240
(
244241
245242
);
246243
247-
reg CLK;
248-
reg RST;
249-
wire [WIDTH-1:0] LED;
244+
localparam uut_WIDTH = 8;
245+
reg uut_CLK;
246+
reg uut_RST;
247+
wire [uut_WIDTH-1:0] uut_LED;
250248
251249
blinkled
252-
#(
253-
.WIDTH(WIDTH)
254-
)
255250
uut
256251
(
257-
.CLK(CLK),
258-
.RST(RST),
259-
.LED(LED)
252+
.CLK(uut_CLK),
253+
.RST(uut_RST),
254+
.LED(uut_LED)
260255
);
261256
262257
263258
initial begin
264259
$dumpfile("uut.vcd");
265-
$dumpvars(0, uut, CLK, RST, LED);
260+
$dumpvars(0, uut, uut_CLK, uut_RST, uut_LED);
266261
end
267262
268263
269264
initial begin
270-
CLK = 0;
265+
uut_CLK = 0;
271266
forever begin
272-
#5 CLK = !CLK;
267+
#5 uut_CLK = !uut_CLK;
273268
end
274269
end
275270
276271
277272
initial begin
278-
RST = 0;
273+
uut_RST = 0;
279274
#100;
280-
RST = 1;
275+
uut_RST = 1;
281276
#100;
282-
RST = 0;
277+
uut_RST = 0;
283278
#100000;
284279
$finish;
285280
end

0 commit comments

Comments
 (0)