mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 11:42:30 +00:00 
			
		
		
		
	Added GP_RINGOSC primitive
This commit is contained in:
		
							parent
							
								
									f6a0f2cf73
								
							
						
					
					
						commit
						1df559c706
					
				
					 1 changed files with 26 additions and 0 deletions
				
			
		|  | @ -75,6 +75,9 @@ module GP_LFOSC(input PWRDN, output reg CLKOUT); | |||
| 	 | ||||
| 	initial CLKOUT = 0; | ||||
| 	 | ||||
| 	//auto powerdown not implemented for simulation | ||||
| 	//output dividers not implemented for simulation | ||||
| 	 | ||||
| 	always begin | ||||
| 		if(PWRDN) | ||||
| 			clkout = 0; | ||||
|  | @ -87,6 +90,29 @@ module GP_LFOSC(input PWRDN, output reg CLKOUT); | |||
| 	 | ||||
| endmodule | ||||
| 
 | ||||
| module GP_RINGOSC(input PWRDN, output reg CLKOUT); | ||||
| 	 | ||||
| 	parameter PWRDN_EN = 0; | ||||
| 	parameter AUTO_PWRDN = 0; | ||||
| 	parameter OUT_DIV = 1; | ||||
| 	 | ||||
| 	initial CLKOUT = 0; | ||||
| 	 | ||||
| 	//output dividers not implemented for simulation | ||||
| 	//auto powerdown not implemented for simulation | ||||
| 	 | ||||
| 	always begin | ||||
| 		if(PWRDN) | ||||
| 			clkout = 0; | ||||
| 		else begin | ||||
| 			//half period of 27 MHz | ||||
| 			#18.518; | ||||
| 			clkout = ~clkout; | ||||
| 		end | ||||
| 	end | ||||
| 	 | ||||
| endmodule | ||||
| 
 | ||||
| module GP_COUNT8(input CLK, input wire RST, output reg OUT); | ||||
| 
 | ||||
| 	parameter RESET_MODE 	= "RISING";	 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue