mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
Fix progbufaddr size
This commit is contained in:
parent
e9194395e3
commit
a91dcd8372
@ -68,7 +68,7 @@ module dm import cvw::*; #(parameter cvw_t P) (
|
|||||||
output logic DebugRegUpdate, // writes values from scan register after scanning in
|
output logic DebugRegUpdate, // writes values from scan register after scanning in
|
||||||
|
|
||||||
// Program Buffer
|
// Program Buffer
|
||||||
output logic [$clog2(PROGBUF_SIZE)-1:0] ProgBufAddr,
|
output logic [P.XLEN-1:0] ProgBufAddr,
|
||||||
output logic ProgBuffScanEn,
|
output logic ProgBuffScanEn,
|
||||||
output logic ExecProgBuf
|
output logic ExecProgBuf
|
||||||
);
|
);
|
||||||
@ -88,6 +88,7 @@ module dm import cvw::*; #(parameter cvw_t P) (
|
|||||||
logic RspValid;
|
logic RspValid;
|
||||||
logic [31:0] RspData;
|
logic [31:0] RspData;
|
||||||
logic [1:0] RspOP;
|
logic [1:0] RspOP;
|
||||||
|
logic [P.XLEN-`DMI_ADDR_WIDTH-1:0] UpperReqAddr;
|
||||||
|
|
||||||
// JTAG ID for Wally:
|
// JTAG ID for Wally:
|
||||||
// Version [31:28] = 0x1 : 0001
|
// Version [31:28] = 0x1 : 0001
|
||||||
@ -174,6 +175,8 @@ module dm import cvw::*; #(parameter cvw_t P) (
|
|||||||
logic [2:0] CmdErr;
|
logic [2:0] CmdErr;
|
||||||
const logic [3:0] DataCount = DATA_COUNT[3:0];
|
const logic [3:0] DataCount = DATA_COUNT[3:0];
|
||||||
|
|
||||||
|
assign UpperReqAddr = '0;
|
||||||
|
|
||||||
// Core control signals
|
// Core control signals
|
||||||
assign AllHaveReset = HaveReset;
|
assign AllHaveReset = HaveReset;
|
||||||
assign AnyHaveReset = HaveReset;
|
assign AnyHaveReset = HaveReset;
|
||||||
@ -373,7 +376,7 @@ module dm import cvw::*; #(parameter cvw_t P) (
|
|||||||
CmdErr <= ~|CmdErr ? `CMDERR_BUSY : CmdErr;
|
CmdErr <= ~|CmdErr ? `CMDERR_BUSY : CmdErr;
|
||||||
else begin
|
else begin
|
||||||
NewAcState <= PROGBUFF_WRITE;
|
NewAcState <= PROGBUFF_WRITE;
|
||||||
ProgBufAddr <= ReqAddress[$clog2(PROGBUF_SIZE)-1:0];
|
ProgBufAddr <= {UpperReqAddr, ReqAddress};
|
||||||
end
|
end
|
||||||
RspOP <= `OP_SUCCESS;
|
RspOP <= `OP_SUCCESS;
|
||||||
State <= ACK;
|
State <= ACK;
|
||||||
|
@ -100,15 +100,13 @@ module ifu import cvw::*; #(parameter cvw_t P) (
|
|||||||
input logic DRet,
|
input logic DRet,
|
||||||
input logic ProgBuffScanEn,
|
input logic ProgBuffScanEn,
|
||||||
// Debug scan chain
|
// Debug scan chain
|
||||||
input logic [$clog2(PROGBUF_SIZE)-1:0] ProgBufAddr,
|
input logic [P.XLEN-1:0] ProgBufAddr,
|
||||||
input logic ProgBufScanIn,
|
input logic ProgBufScanIn,
|
||||||
input logic DebugScanEn,
|
input logic DebugScanEn,
|
||||||
input logic DebugScanIn,
|
input logic DebugScanIn,
|
||||||
output logic DebugScanOut
|
output logic DebugScanOut
|
||||||
);
|
);
|
||||||
|
|
||||||
localparam PROGBUF_SIZE = (P.PROGBUF_RANGE+1)/4;
|
|
||||||
|
|
||||||
localparam [31:0] nop = 32'h00000013; // instruction for NOP
|
localparam [31:0] nop = 32'h00000013; // instruction for NOP
|
||||||
localparam LINELEN = P.ICACHE_SUPPORTED ? P.ICACHE_LINELENINBITS : P.XLEN;
|
localparam LINELEN = P.ICACHE_SUPPORTED ? P.ICACHE_LINELENINBITS : P.XLEN;
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ module progbuf import cvw::*; #(parameter cvw_t P) (
|
|||||||
input logic [5:0] Addr,
|
input logic [5:0] Addr,
|
||||||
output logic [31:0] ProgBufInstrF,
|
output logic [31:0] ProgBufInstrF,
|
||||||
|
|
||||||
input logic [$clog2(PROGBUF_SIZE)-1:0] ScanAddr,
|
input logic [P.XLEN-1:0] ScanAddr,
|
||||||
input logic Scan,
|
input logic Scan,
|
||||||
input logic ScanIn
|
input logic ScanIn
|
||||||
);
|
);
|
||||||
|
@ -68,12 +68,10 @@ module wallypipelinedcore import cvw::*; #(parameter cvw_t P) (
|
|||||||
input logic [11:0] DebugRegAddr, // address for scanable regfiles (GPR, FPR, CSR)
|
input logic [11:0] DebugRegAddr, // address for scanable regfiles (GPR, FPR, CSR)
|
||||||
input logic DebugCapture, // latches values into scan register before scanning out
|
input logic DebugCapture, // latches values into scan register before scanning out
|
||||||
input logic DebugRegUpdate, // writes values from scan register after scanning in
|
input logic DebugRegUpdate, // writes values from scan register after scanning in
|
||||||
input logic [$clog2(PROGBUF_SIZE)-1:0] ProgBufAddr,
|
input logic [P.XLEN-1:0] ProgBufAddr,
|
||||||
input logic ProgBuffScanEn
|
input logic ProgBuffScanEn
|
||||||
);
|
);
|
||||||
|
|
||||||
localparam PROGBUF_SIZE = (P.PROGBUF_RANGE+1)/4;
|
|
||||||
|
|
||||||
logic StallF, StallD, StallE, StallM, StallW;
|
logic StallF, StallD, StallE, StallM, StallW;
|
||||||
logic FlushD, FlushE, FlushM, FlushW;
|
logic FlushD, FlushE, FlushM, FlushW;
|
||||||
logic TrapM, RetM;
|
logic TrapM, RetM;
|
||||||
|
@ -98,11 +98,9 @@ module wallypipelinedsoc import cvw::*; #(parameter cvw_t P) (
|
|||||||
logic [11:0] DebugRegAddr;
|
logic [11:0] DebugRegAddr;
|
||||||
logic DebugCapture;
|
logic DebugCapture;
|
||||||
logic DebugRegUpdate;
|
logic DebugRegUpdate;
|
||||||
logic [$clog2(PROGBUF_SIZE)-1:0] ProgBufAddr;
|
logic [P.XLEN-1:0] ProgBufAddr;
|
||||||
logic ProgBuffScanEn;
|
logic ProgBuffScanEn;
|
||||||
|
|
||||||
localparam PROGBUF_SIZE = (P.PROGBUF_RANGE+1)/4;
|
|
||||||
|
|
||||||
// synchronize reset to SOC clock domain
|
// synchronize reset to SOC clock domain
|
||||||
synchronizer resetsync(.clk, .d(reset_ext), .q(reset));
|
synchronizer resetsync(.clk, .d(reset_ext), .q(reset));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user