mirror of
				https://github.com/openhwgroup/cvw
				synced 2025-02-11 06:05:49 +00:00 
			
		
		
		
	make xCOUNTEREN what buildroot expects it to be
This commit is contained in:
		
							parent
							
								
									6e9c6e3e6a
								
							
						
					
					
						commit
						7aa2f0d953
					
				@ -91,7 +91,7 @@
 | 
			
		||||
`define GPIO_LOOPBACK_TEST 0
 | 
			
		||||
 | 
			
		||||
// Busybear special CSR config to match OVPSim
 | 
			
		||||
`define OVPSIM_CSR_CONFIG 1
 | 
			
		||||
`define OVPSIM_CSR_CONFIG 0
 | 
			
		||||
 | 
			
		||||
// Hardware configuration
 | 
			
		||||
`define UART_PRESCALE 1
 | 
			
		||||
 | 
			
		||||
@ -164,6 +164,8 @@ module csrm #(parameter
 | 
			
		||||
  generate
 | 
			
		||||
    if (`OVPSIM_CSR_CONFIG)
 | 
			
		||||
      flopenl #(32)   MCOUNTERENreg(clk, reset, WriteMCOUNTERENM, {CSRWriteValM[31:2],1'b0,CSRWriteValM[0]}, 32'b0, MCOUNTEREN_REGW);
 | 
			
		||||
    else if (`BUILDROOT == 1)
 | 
			
		||||
      flopenl #(32)   MCOUNTERENreg(clk, reset, WriteMCOUNTERENM, CSRWriteValM[31:0], 32'h0, MCOUNTEREN_REGW);
 | 
			
		||||
    else
 | 
			
		||||
      flopenl #(32)   MCOUNTERENreg(clk, reset, WriteMCOUNTERENM, CSRWriteValM[31:0], 32'hFFFFFFFF, MCOUNTEREN_REGW);
 | 
			
		||||
  endgenerate
 | 
			
		||||
 | 
			
		||||
@ -91,6 +91,8 @@ module csrs #(parameter
 | 
			
		||||
      flopenr #(`XLEN) SATPreg(clk, reset, WriteSATPM, CSRWriteValM, SATP_REGW);
 | 
			
		||||
      if (`OVPSIM_CSR_CONFIG)
 | 
			
		||||
        flopenl #(32)   SCOUNTERENreg(clk, reset, WriteSCOUNTERENM, {CSRWriteValM[31:2],1'b0,CSRWriteValM[0]}, 32'b0, SCOUNTEREN_REGW);
 | 
			
		||||
      else if (`BUILDROOT == 1)
 | 
			
		||||
        flopenl #(32)   SCOUNTERENreg(clk, reset, WriteSCOUNTERENM, CSRWriteValM[31:0], 32'h0, SCOUNTEREN_REGW);
 | 
			
		||||
      else
 | 
			
		||||
        flopenl #(32)   SCOUNTERENreg(clk, reset, WriteSCOUNTERENM, CSRWriteValM[31:0], 32'hFFFFFFFF, SCOUNTEREN_REGW);
 | 
			
		||||
      if (`N_SUPPORTED) begin
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user