File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,6 @@ Let's begin veriloggen by an example. Create a example Python script in Python a
7878``` python
7979import sys
8080import os
81-
8281from veriloggen import *
8382
8483def mkLed ():
@@ -92,14 +91,14 @@ def mkLed():
9291 m.Always(Posedge(clk))(
9392 If(rst)(
9493 count(0 )
95- ).els (
94+ ).Else (
9695 count(count + 1 )
9796 ))
9897
9998 m.Always(Posedge(clk))(
10099 If(rst)(
101100 led(0 )
102- ).els (
101+ ).Else (
103102 If(count == 1024 - 1 )(
104103 led(led + 1 )
105104 )
@@ -108,7 +107,7 @@ def mkLed():
108107 return m
109108
110109led = mkLed()
111- verilog = led.toVerilog ()
110+ verilog = led.to_verilog ()
112111print (verilog)
113112```
114113
Original file line number Diff line number Diff line change @@ -92,7 +92,6 @@ Python as below. A blinking LED hardware is modeled in Python.
9292
9393 import sys
9494 import os
95-
9695 from veriloggen import *
9796
9897 def mkLed ():
@@ -106,14 +105,14 @@ Python as below. A blinking LED hardware is modeled in Python.
106105 m.Always(Posedge(clk))(
107106 If(rst)(
108107 count(0 )
109- ).els (
108+ ).Else (
110109 count(count + 1 )
111110 ))
112111
113112 m.Always(Posedge(clk))(
114113 If(rst)(
115114 led(0 )
116- ).els (
115+ ).Else (
117116 If(count == 1024 - 1 )(
118117 led(led + 1 )
119118 )
@@ -122,7 +121,7 @@ Python as below. A blinking LED hardware is modeled in Python.
122121 return m
123122
124123 led = mkLed()
125- verilog = led.toVerilog ()
124+ verilog = led.to_verilog ()
126125 print (verilog)
127126
128127 Run the script.
You can’t perform that action at this time.
0 commit comments