npc: wip, cannot build
This commit is contained in:
parent
29a9850210
commit
3acab0a751
19 changed files with 404 additions and 128 deletions
|
@ -14,7 +14,7 @@ module RamDpi (
|
|||
input reg [31:0] pc,
|
||||
output reg [31:0] inst
|
||||
);
|
||||
always @(*) begin
|
||||
always @(posedge clock) begin
|
||||
if (valid) begin // 有读写请求时
|
||||
readData = pmem_read(readAddr);
|
||||
if (writeEnable) begin // 有写请求时
|
||||
|
@ -22,8 +22,8 @@ module RamDpi (
|
|||
end
|
||||
end
|
||||
else begin
|
||||
readData = 0;
|
||||
readData = 32'h80000000;
|
||||
end
|
||||
inst = pmem_read(pc);
|
||||
end
|
||||
endmodule
|
||||
assign inst = pmem_read(pc);
|
||||
endmodule
|
||||
|
|
|
@ -242,12 +242,12 @@ class Control(width: Int) extends RawModule {
|
|||
|
||||
(xori , (r(true.B) :: r(rAluOut) ::
|
||||
r(false.B) :: r(pStaticNpc) ::
|
||||
r(aOpOr) :: r(aSrcARs1) :: r(aSrcBImmI) :: l(Bool()) ::
|
||||
r(aOpXor) :: r(aSrcARs1) :: r(aSrcBImmI) :: l(Bool()) ::
|
||||
r(false.B) :: l(UInt(4.W)):: r(false.B) :: HNil)),
|
||||
|
||||
(ori , (r(true.B) :: r(rAluOut) ::
|
||||
r(false.B) :: r(pStaticNpc) ::
|
||||
r(aOpXor) :: r(aSrcARs1) :: r(aSrcBImmI) :: l(Bool()) ::
|
||||
r(aOpOr) :: r(aSrcARs1) :: r(aSrcBImmI) :: l(Bool()) ::
|
||||
r(false.B) :: l(UInt(4.W)):: r(false.B) :: HNil)),
|
||||
|
||||
(andi , (r(true.B) :: r(rAluOut) ::
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue