Skip to content

Commit 74b8407

Browse files
committed
Updated README
1 parent 2e47e3b commit 74b8407

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff 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

115117
Run the script.

README.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)