mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-04 05:19:11 +00:00 
			
		
		
		
	enum in package test
This commit is contained in:
		
							parent
							
								
									febe7706a2
								
							
						
					
					
						commit
						caf35896da
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -1,11 +1,14 @@
 | 
			
		|||
package pkg;
 | 
			
		||||
	typedef logic [7:0] uint8_t;
 | 
			
		||||
	typedef enum logic [7:0] {bb=8'hBB} enum8_t;
 | 
			
		||||
endpackage
 | 
			
		||||
 | 
			
		||||
module top;
 | 
			
		||||
 | 
			
		||||
	(* keep *) (pkg::uint8_t) a = 8'hAA;
 | 
			
		||||
	(* keep *) (pkg::enum8_t) b_enum = pkg::bb;
 | 
			
		||||
 | 
			
		||||
	always @* assert(a == 8'hAA);
 | 
			
		||||
	always @* assert(b_enum == 8'hBB);
 | 
			
		||||
 | 
			
		||||
endmodule
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue