mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 03:32:29 +00:00 
			
		
		
		
	tests: attributes before task enable
This commit is contained in:
		
							parent
							
								
									27b7ffc754
								
							
						
					
					
						commit
						e7fd8912f0
					
				
					 1 changed files with 28 additions and 0 deletions
				
			
		
							
								
								
									
										28
									
								
								tests/verilog/task_attr.ys
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								tests/verilog/task_attr.ys
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,28 @@ | |||
| read_verilog <<EOT | ||||
| module top; | ||||
|     task foo; | ||||
|     endtask | ||||
| 
 | ||||
|     always @* | ||||
|         (* foo *) foo; | ||||
| 
 | ||||
|     initial | ||||
|         if (0) $info("bar"); | ||||
| endmodule | ||||
| EOT | ||||
| # Since task enables are not an RTLIL object, | ||||
| #   any attributes on their AST get dropped | ||||
| select -assert-none a:* a:src %d | ||||
| 
 | ||||
| 
 | ||||
| logger -expect error "syntax error, unexpected ATTR_BEGIN" 1 | ||||
| design -reset | ||||
| read_verilog <<EOT | ||||
| module top; | ||||
|     task foo; | ||||
|     endtask | ||||
| 
 | ||||
|     always @* | ||||
|         foo (* foo *); | ||||
| endmodule | ||||
| EOT | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue