File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -107,9 +107,11 @@ def mkLed():
107107
108108 return m
109109
110- led = mkLed()
111- verilog = led.to_verilog()
112- print (verilog)
110+ if __name__ == ' __main__' :
111+ led = mkLed()
112+ # led.to_verilog(filename='tmp.v')
113+ verilog = led.to_verilog()
114+ print (verilog)
113115```
114116
115117Run the script.
Original file line number Diff line number Diff line change @@ -123,9 +123,11 @@ Python as below. A blinking LED hardware is modeled in Python.
123123
124124 return m
125125
126- led = mkLed()
127- verilog = led.to_verilog()
128- print (verilog)
126+ if __name__ == ' __main__' :
127+ led = mkLed()
128+ # led.to_verilog(filename='tmp.v')
129+ verilog = led.to_verilog()
130+ print (verilog)
129131
130132 Run the script.
131133
You can’t perform that action at this time.
0 commit comments