mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-03 21:09:12 +00:00 
			
		
		
		
	sv: Add test scripts for typedefs
Signed-off-by: David Shah <dave@ds0.me>
This commit is contained in:
		
							parent
							
								
									c0bb47beca
								
							
						
					
					
						commit
						abc155715d
					
				
					 5 changed files with 31 additions and 0 deletions
				
			
		
							
								
								
									
										3
									
								
								tests/svtypes/.gitignore
									
										
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								tests/svtypes/.gitignore
									
										
									
									
										vendored
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,3 @@
 | 
			
		|||
/*.log
 | 
			
		||||
/*.out
 | 
			
		||||
/run-test.mk
 | 
			
		||||
							
								
								
									
										20
									
								
								tests/svtypes/run-test.sh
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										20
									
								
								tests/svtypes/run-test.sh
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,20 @@
 | 
			
		|||
#!/usr/bin/env bash
 | 
			
		||||
set -e
 | 
			
		||||
{
 | 
			
		||||
echo "all::"
 | 
			
		||||
for x in *.ys; do
 | 
			
		||||
	echo "all:: run-$x"
 | 
			
		||||
	echo "run-$x:"
 | 
			
		||||
	echo "	@echo 'Running $x..'"
 | 
			
		||||
	echo "	@../../yosys -ql ${x%.ys}.log $x"
 | 
			
		||||
done
 | 
			
		||||
for x in *.sv; do
 | 
			
		||||
	if [ ! -f "${x%.sv}.ys"  ]; then
 | 
			
		||||
		echo "all:: check-$x"
 | 
			
		||||
		echo "check-$x:"
 | 
			
		||||
		echo "	@echo 'Checking $x..'"
 | 
			
		||||
		echo "	@../../yosys -ql ${x%.sv}.log -p \"prep -top top; sat -verify -prove-asserts\" $x"
 | 
			
		||||
	fi
 | 
			
		||||
done
 | 
			
		||||
} > run-test.mk
 | 
			
		||||
exec ${MAKE:-make} -f run-test.mk
 | 
			
		||||
							
								
								
									
										3
									
								
								tests/svtypes/typedef_memory.ys
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								tests/svtypes/typedef_memory.ys
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,3 @@
 | 
			
		|||
read -sv typedef_memory.sv
 | 
			
		||||
prep -top top
 | 
			
		||||
select -assert-count 1 t:$mem r:SIZE=16 %i r:WIDTH=4 %i
 | 
			
		||||
							
								
								
									
										4
									
								
								tests/svtypes/typedef_memory_2.ys
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								tests/svtypes/typedef_memory_2.ys
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,4 @@
 | 
			
		|||
read -sv typedef_memory_2.sv
 | 
			
		||||
prep -top top
 | 
			
		||||
dump
 | 
			
		||||
select -assert-count 1 t:$mem r:SIZE=16 %i r:WIDTH=4 %i
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue