mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-04 05:19:11 +00:00 
			
		
		
		
	Updated PGEN model to have level triggered reset (matches actual hardware behavior
This commit is contained in:
		
							parent
							
								
									e5109847c9
								
							
						
					
					
						commit
						3a404be62a
					
				
					 1 changed files with 4 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -741,10 +741,10 @@ module GP_PGEN(input wire nRST, input wire CLK, output reg OUT);
 | 
			
		|||
	localparam COUNT_MAX =  PATTERN_LEN - 1'h1;
 | 
			
		||||
 | 
			
		||||
	reg[3:0] count = 0;
 | 
			
		||||
	always @(posedge CLK) begin
 | 
			
		||||
		if(!nRST) begin
 | 
			
		||||
			count	<= COUNT_MAX;
 | 
			
		||||
		end
 | 
			
		||||
	always @(posedge CLK, negedge nRST) begin
 | 
			
		||||
 | 
			
		||||
		if(!nRST)
 | 
			
		||||
			count	<= 0;
 | 
			
		||||
 | 
			
		||||
		else begin
 | 
			
		||||
			count	<= count - 1'h1;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue