mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-03 21:09:12 +00:00 
			
		
		
		
	Little steps in realmath test bench
This commit is contained in:
		
							parent
							
								
									65b2e9c064
								
							
						
					
					
						commit
						3345fa0bab
					
				
					 2 changed files with 8 additions and 2 deletions
				
			
		| 
						 | 
					@ -43,12 +43,12 @@ for idx in range(100):
 | 
				
			||||||
    with file('temp/uut_%05d.v' % idx, 'w') as f, redirect_stdout(f):
 | 
					    with file('temp/uut_%05d.v' % idx, 'w') as f, redirect_stdout(f):
 | 
				
			||||||
        print('module uut_%05d(output [63:0] %s);\n' % (idx, ', '.join(['y%02d' % i for i in range(100)])))
 | 
					        print('module uut_%05d(output [63:0] %s);\n' % (idx, ', '.join(['y%02d' % i for i in range(100)])))
 | 
				
			||||||
        for i in range(30):
 | 
					        for i in range(30):
 | 
				
			||||||
            if idx < 10 or True:
 | 
					            if idx < 10:
 | 
				
			||||||
                print('localparam p%02d = %s;' % (i, random_expression()))
 | 
					                print('localparam p%02d = %s;' % (i, random_expression()))
 | 
				
			||||||
            else:
 | 
					            else:
 | 
				
			||||||
                print('localparam%s p%02d = %s;' % (random.choice(['', ' real', ' integer']), i, random_expression()))
 | 
					                print('localparam%s p%02d = %s;' % (random.choice(['', ' real', ' integer']), i, random_expression()))
 | 
				
			||||||
        for i in range(30, 60):
 | 
					        for i in range(30, 60):
 | 
				
			||||||
            if idx < 10 or True:
 | 
					            if idx < 10:
 | 
				
			||||||
                print('localparam p%02d = %s;' % (i, random_expression(maxparam = 30)))
 | 
					                print('localparam p%02d = %s;' % (i, random_expression(maxparam = 30)))
 | 
				
			||||||
            else:
 | 
					            else:
 | 
				
			||||||
                print('localparam%s p%02d = %s;' % (random.choice(['', ' real', ' integer']), i, random_expression(maxparam = 30)))
 | 
					                print('localparam%s p%02d = %s;' % (random.choice(['', ' real', ' integer']), i, random_expression(maxparam = 30)))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -13,3 +13,9 @@ module demo_001(y1, y2, y3, y4);
 | 
				
			||||||
	assign y4 = p4 + 0.2;
 | 
						assign y4 = p4 + 0.2;
 | 
				
			||||||
endmodule
 | 
					endmodule
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					module demo_002(y1);
 | 
				
			||||||
 | 
						output [3:0] y1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						assign y1 = 1'bx >= (-1 * -1.17);
 | 
				
			||||||
 | 
					endmodule
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue