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():
107
107
108
108
return m
109
109
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)
113
115
```
114
116
115
117
Run 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.
123
123
124
124
return m
125
125
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)
129
131
130
132
Run the script.
131
133
You can’t perform that action at this time.
0 commit comments