mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-03 21:09:12 +00:00 
			
		
		
		
	Cleanups and improvements in examples/cmos/
This commit is contained in:
		
							parent
							
								
									3265795154
								
							
						
					
					
						commit
						dac807fb33
					
				
					 5 changed files with 19 additions and 12 deletions
				
			
		
							
								
								
									
										4
									
								
								examples/cmos/.gitignore
									
										
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								examples/cmos/.gitignore
									
										
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,4 @@
 | 
				
			||||||
 | 
					counter_tb
 | 
				
			||||||
 | 
					counter_tb.vcd
 | 
				
			||||||
 | 
					synth.sp
 | 
				
			||||||
 | 
					synth.v
 | 
				
			||||||
| 
						 | 
					@ -1,7 +1,7 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
In this directory you will find out, how to generate a spice output
 | 
					In this directory contains an example for generating a spice output using two
 | 
				
			||||||
operating in two modes, analog or event-driven mode supported by ngspice
 | 
					different spice modes, normal analog transient simulation and event-driven
 | 
				
			||||||
xspice sub-module.
 | 
					digital simulation as supported by ngspice xspice sub-module.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Each test bench can be run separately by either running:
 | 
					Each test bench can be run separately by either running:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -9,4 +9,5 @@ Each test bench can be run separately by either running:
 | 
				
			||||||
- testbench_digital.sh for mixed-signal digital simulation.
 | 
					- testbench_digital.sh for mixed-signal digital simulation.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
The later case also includes pure verilog simulation using the iverilog
 | 
					The later case also includes pure verilog simulation using the iverilog
 | 
				
			||||||
and gtkwave to represent the results.
 | 
					and gtkwave for comparison.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										5
									
								
								examples/cmos/counter_tb.gtkw
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								examples/cmos/counter_tb.gtkw
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,5 @@
 | 
				
			||||||
 | 
					[dumpfile] "counter_tb.vcd"
 | 
				
			||||||
 | 
					counter_tb.clk
 | 
				
			||||||
 | 
					counter_tb.count[2:0]
 | 
				
			||||||
 | 
					counter_tb.en
 | 
				
			||||||
 | 
					counter_tb.reset
 | 
				
			||||||
| 
						 | 
					@ -5,6 +5,3 @@ set -ex
 | 
				
			||||||
../../yosys counter.ys
 | 
					../../yosys counter.ys
 | 
				
			||||||
ngspice testbench.sp
 | 
					ngspice testbench.sp
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# requires ngspice with xspice support enabled:
 | 
					 | 
				
			||||||
#ngspice testbench_digital.sp
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,15 +1,15 @@
 | 
				
			||||||
#!/bin/bash
 | 
					#!/bin/bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					set -ex
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# iverlog simulation
 | 
					# iverlog simulation
 | 
				
			||||||
echo "Doing Verilog simulation with iverilog"
 | 
					echo "Doing Verilog simulation with iverilog"
 | 
				
			||||||
iverilog -o dsn counter.v counter_tb.v 
 | 
					iverilog -o counter_tb counter.v counter_tb.v 
 | 
				
			||||||
./dsn -lxt2
 | 
					./counter_tb; gtkwave counter_tb.gtkw &
 | 
				
			||||||
gtkwave counter_tb.vcd &
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
# yosys synthesis
 | 
					# yosys synthesis
 | 
				
			||||||
set -ex
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
../../yosys counter_digital.ys
 | 
					../../yosys counter_digital.ys
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# requires ngspice with xspice support enabled:
 | 
					# requires ngspice with xspice support enabled:
 | 
				
			||||||
ngspice testbench_digital.sp
 | 
					ngspice testbench_digital.sp
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue