mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 03:32:29 +00:00 
			
		
		
		
	Fixes a bug in the handling of the recently introduced $check cells. Both $check and $print cells in clk2fflogic are handled by the same code and the existing tests for that were only using $print cells. This missed a bug where the additional A signal of $check cells that is not present on $print cells was dropped due to a typo, rendering $check cells non-functional. Also updates the tests to explicitly cover both cell types such that they would have detected the now fixed bug.
		
			
				
	
	
		
			35 lines
		
	
	
	
		
			1.3 KiB
		
	
	
	
		
			Bash
		
	
	
		
			Executable file
		
	
	
	
	
			
		
		
	
	
			35 lines
		
	
	
	
		
			1.3 KiB
		
	
	
	
		
			Bash
		
	
	
		
			Executable file
		
	
	
	
	
| #!/usr/bin/env bash
 | |
| set -e
 | |
| 
 | |
| # TODO: when sim gets native $check support, remove the -DNO_ASSERT here
 | |
| echo Running yosys sim
 | |
| ../../yosys -q -p "
 | |
| read_verilog -formal -DNO_ASSERT clk2fflogic_effects.sv
 | |
| hierarchy -top top; proc;;
 | |
| 
 | |
| tee -q -o clk2fflogic_effects.sim.log sim -q -n 32
 | |
| "
 | |
| echo Running yosys clk2fflogic sim
 | |
| ../../yosys -q -p "
 | |
| read_verilog -formal clk2fflogic_effects.sv
 | |
| hierarchy -top top; proc;;
 | |
| clk2fflogic;;
 | |
| 
 | |
| logger -nowarn ^Assertion
 | |
| tee -q -o clk2fflogic_effects.clk2fflogic.log sim -q -n 32
 | |
| "
 | |
| 
 | |
| echo Running iverilog sim
 | |
| iverilog -g2012 -DNO_ASSERT -o clk2fflogic_effects.iv.out clk2fflogic_effects.sv
 | |
| 
 | |
| 
 | |
| ./clk2fflogic_effects.iv.out > clk2fflogic_effects.iv.log
 | |
| 
 | |
| gawk '/([0-9]+):/{T=$1;print};/^Failed/{print T,$0}' clk2fflogic_effects.iv.log | sort > clk2fflogic_effects.iv.sorted.log
 | |
| gawk '/([0-9]+):/{T=$1;print};/^Failed/{print T,$0}' clk2fflogic_effects.sim.log | sort > clk2fflogic_effects.sim.sorted.log
 | |
| gawk '/([0-9]+):/{T=$1;print};/^Failed/{print T,$0}' clk2fflogic_effects.clk2fflogic.log | sort > clk2fflogic_effects.clk2fflogic.sorted.log
 | |
| 
 | |
| echo Comparing iverilog sim vs yosys sim
 | |
| cmp clk2fflogic_effects.iv.sorted.log clk2fflogic_effects.sim.sorted.log
 | |
| echo Comparing iverilog sim vs yosys clk2fflogic sim
 | |
| cmp clk2fflogic_effects.iv.sorted.log clk2fflogic_effects.clk2fflogic.sorted.log
 |