Cleanup some unused signals
This commit is contained in:
		
							parent
							
								
									96e55a5446
								
							
						
					
					
						commit
						3b7cd9bc96
					
				|  | @ -24,13 +24,6 @@ module hazard3_alu #( | ||||||
| // ---------------------------------------------------------------------------- | // ---------------------------------------------------------------------------- | ||||||
| // Fiddle around with add/sub, comparisons etc (all related). | // Fiddle around with add/sub, comparisons etc (all related). | ||||||
| 
 | 
 | ||||||
| function msb; |  | ||||||
| input [W_DATA-1:0] x; |  | ||||||
| begin |  | ||||||
| 	msb = x[W_DATA-1]; |  | ||||||
| end |  | ||||||
| endfunction |  | ||||||
| 
 |  | ||||||
| wire sub = !(aluop == ALUOP_ADD || (|EXTENSION_ZBA && aluop == ALUOP_SHXADD)); | wire sub = !(aluop == ALUOP_ADD || (|EXTENSION_ZBA && aluop == ALUOP_SHXADD)); | ||||||
| 
 | 
 | ||||||
| wire inv_op_b = sub && !( | wire inv_op_b = sub && !( | ||||||
|  | @ -52,8 +45,8 @@ wire cmp_is_unsigned = aluop == ALUOP_LTU || | ||||||
| 	|EXTENSION_ZBB && aluop == ALUOP_MAXU || | 	|EXTENSION_ZBB && aluop == ALUOP_MAXU || | ||||||
| 	|EXTENSION_ZBB && aluop == ALUOP_MINU; | 	|EXTENSION_ZBB && aluop == ALUOP_MINU; | ||||||
| 
 | 
 | ||||||
| wire lt = msb(op_a) == msb(op_b) ? msb(sum)  : | wire lt = op_a[W_DATA-1] == op_b[W_DATA-1] ? sum[W_DATA-1]  : | ||||||
|           cmp_is_unsigned        ? msb(op_b) : msb(op_a) ; |           cmp_is_unsigned                  ? op_b[W_DATA-1] : op_a[W_DATA-1] ; | ||||||
| 
 | 
 | ||||||
| assign cmp = aluop == ALUOP_SUB ? |op_xor : lt; | assign cmp = aluop == ALUOP_SUB ? |op_xor : lt; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -87,7 +87,6 @@ module hazard3_cpu_2port #( | ||||||
| 
 | 
 | ||||||
| // Instruction fetch signals | // Instruction fetch signals | ||||||
| wire              core_aph_req_i; | wire              core_aph_req_i; | ||||||
| wire              core_aph_panic_i; // unused as there's no arbitration |  | ||||||
| wire              core_aph_ready_i; | wire              core_aph_ready_i; | ||||||
| wire              core_dph_ready_i; | wire              core_dph_ready_i; | ||||||
| wire              core_dph_err_i; | wire              core_dph_err_i; | ||||||
|  | @ -124,7 +123,7 @@ hazard3_core #( | ||||||
| 	`endif | 	`endif | ||||||
| 
 | 
 | ||||||
| 	.bus_aph_req_i              (core_aph_req_i), | 	.bus_aph_req_i              (core_aph_req_i), | ||||||
| 	.bus_aph_panic_i            (core_aph_panic_i), | 	.bus_aph_panic_i            (/* unused for 2port */), | ||||||
| 	.bus_aph_ready_i            (core_aph_ready_i), | 	.bus_aph_ready_i            (core_aph_ready_i), | ||||||
| 	.bus_dph_ready_i            (core_dph_ready_i), | 	.bus_dph_ready_i            (core_dph_ready_i), | ||||||
| 	.bus_dph_err_i              (core_dph_err_i), | 	.bus_dph_err_i              (core_dph_err_i), | ||||||
|  |  | ||||||
|  | @ -277,8 +277,6 @@ always @ (posedge clk or negedge rst_n) begin | ||||||
| 	end | 	end | ||||||
| end | end | ||||||
| 
 | 
 | ||||||
| wire mie_meie = mie[11]; |  | ||||||
| 
 |  | ||||||
| // Interrupt pending register (assigned later). In our implementation this | // Interrupt pending register (assigned later). In our implementation this | ||||||
| // register is entirely read-only. | // register is entirely read-only. | ||||||
| wire [XLEN-1:0] mip; | wire [XLEN-1:0] mip; | ||||||
|  |  | ||||||
|  | @ -123,6 +123,7 @@ always @ (*) begin: boundary_conditions | ||||||
| 	integer i; | 	integer i; | ||||||
| 	fifo_mem[FIFO_DEPTH] = mem_data; | 	fifo_mem[FIFO_DEPTH] = mem_data; | ||||||
| 	fifo_predbranch[FIFO_DEPTH] = 2'b00; | 	fifo_predbranch[FIFO_DEPTH] = 2'b00; | ||||||
|  | 	fifo_err[FIFO_DEPTH] = 1'b0; | ||||||
| 	fifo_valid_hw[FIFO_DEPTH] = 2'b00; | 	fifo_valid_hw[FIFO_DEPTH] = 2'b00; | ||||||
| 	fifo_valid[FIFO_DEPTH] = 1'b0; | 	fifo_valid[FIFO_DEPTH] = 1'b0; | ||||||
| 	fifo_valid[-1] = 1'b1; | 	fifo_valid[-1] = 1'b1; | ||||||
|  |  | ||||||
|  | @ -183,7 +183,6 @@ end | ||||||
| // load/store/AMO alignment fault (mcause = 4, 6), in the case that both | // load/store/AMO alignment fault (mcause = 4, 6), in the case that both | ||||||
| // happen, and we choose alignment fault in this case. | // happen, and we choose alignment fault in this case. | ||||||
| 
 | 
 | ||||||
| reg d_match; |  | ||||||
| reg d_m; // Hazard3 extension (M-mode without locking) | reg d_m; // Hazard3 extension (M-mode without locking) | ||||||
| reg d_l; | reg d_l; | ||||||
| reg d_r; | reg d_r; | ||||||
|  | @ -191,7 +190,6 @@ reg d_w; | ||||||
| 
 | 
 | ||||||
| always @ (*) begin: check_d_match | always @ (*) begin: check_d_match | ||||||
| 	integer i; | 	integer i; | ||||||
| 	d_match = 1'b0; |  | ||||||
| 	d_m = 1'b0; | 	d_m = 1'b0; | ||||||
| 	d_l = 1'b0; | 	d_l = 1'b0; | ||||||
| 	d_r = 1'b0; | 	d_r = 1'b0; | ||||||
|  | @ -200,7 +198,6 @@ always @ (*) begin: check_d_match | ||||||
| 	// inferred as a priority mux structure (cascade mux). | 	// inferred as a priority mux structure (cascade mux). | ||||||
| 	for (i = PMP_REGIONS - 1; i >= 0; i = i - 1) begin | 	for (i = PMP_REGIONS - 1; i >= 0; i = i - 1) begin | ||||||
| 		if (|pmpcfg_a[i] && (d_addr & match_mask[i]) == match_addr[i]) begin | 		if (|pmpcfg_a[i] && (d_addr & match_mask[i]) == match_addr[i]) begin | ||||||
| 			d_match = 1'b1; |  | ||||||
| 			d_m = pmpcfg_m[i]; | 			d_m = pmpcfg_m[i]; | ||||||
| 			d_l = pmpcfg_l[i]; | 			d_l = pmpcfg_l[i]; | ||||||
| 			d_r = pmpcfg_r[i]; | 			d_r = pmpcfg_r[i]; | ||||||
|  | @ -240,7 +237,6 @@ end | ||||||
| // completely match a lower-numbered region. We don't accumulate the partial | // completely match a lower-numbered region. We don't accumulate the partial | ||||||
| // match across all regions. | // match across all regions. | ||||||
| 
 | 
 | ||||||
| reg i_match; |  | ||||||
| reg i_partial_match; | reg i_partial_match; | ||||||
| reg i_m; // Hazard3 extension (M-mode without locking) | reg i_m; // Hazard3 extension (M-mode without locking) | ||||||
| reg i_l; | reg i_l; | ||||||
|  | @ -251,7 +247,6 @@ wire [W_ADDR-1:0] i_addr_hw1 = i_addr + 2'h2; | ||||||
| always @ (*) begin: check_i_match | always @ (*) begin: check_i_match | ||||||
| 	integer i; | 	integer i; | ||||||
| 	reg match_hw0, match_hw1; | 	reg match_hw0, match_hw1; | ||||||
| 	i_match = 1'b0; |  | ||||||
| 	i_partial_match = 1'b0; | 	i_partial_match = 1'b0; | ||||||
| 	i_m = 1'b0; | 	i_m = 1'b0; | ||||||
| 	i_l = 1'b0; | 	i_l = 1'b0; | ||||||
|  | @ -260,7 +255,6 @@ always @ (*) begin: check_i_match | ||||||
| 		match_hw0 = |pmpcfg_a[i] && (i_addr     & match_mask[i]) == match_addr[i]; | 		match_hw0 = |pmpcfg_a[i] && (i_addr     & match_mask[i]) == match_addr[i]; | ||||||
| 		match_hw1 = |pmpcfg_a[i] && (i_addr_hw1 & match_mask[i]) == match_addr[i]; | 		match_hw1 = |pmpcfg_a[i] && (i_addr_hw1 & match_mask[i]) == match_addr[i]; | ||||||
| 		if (match_hw0 || match_hw1) begin | 		if (match_hw0 || match_hw1) begin | ||||||
| 			i_match = 1'b1; |  | ||||||
| 			i_partial_match = (match_hw0 ^ match_hw1) && i_instr_is_32bit; | 			i_partial_match = (match_hw0 ^ match_hw1) && i_instr_is_32bit; | ||||||
| 			i_m = pmpcfg_m[i]; | 			i_m = pmpcfg_m[i]; | ||||||
| 			i_l = pmpcfg_l[i]; | 			i_l = pmpcfg_l[i]; | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue