Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
Risc V Single Cycle Stub
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
秦槿
Risc V Single Cycle Stub
Commits
eb5bfad7
Commit
eb5bfad7
authored
2 years ago
by
秦槿
Browse files
Options
Downloads
Patches
Plain Diff
slli
parent
74feafa4
Branches
Branches containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
xgriscv_datapath.v
+3
-3
3 additions, 3 deletions
xgriscv_datapath.v
with
3 additions
and
3 deletions
xgriscv_datapath.v
+
3
−
3
View file @
eb5bfad7
...
...
@@ -49,7 +49,7 @@ module datapath(
wire
[
`XLEN
-
1
:
0
]
rdata1
,
rdata2
,
wdata
;
wire
[
`RFIDX_WIDTH
-
1
:
0
]
waddr
=
rd
;
wire
[
`XLEN
-
1
:
0
]
a
,
b
;
//更新pc
wire
stall
=
1'b0
;
...
...
@@ -57,12 +57,12 @@ module datapath(
pcenr
pcr
(
clk
,
reset
,
~
stall
,
newpc
,
pc
);
addr_adder
pcadder
(
pc
,
`ADDR_SIZE
'b100
,
newpc
);
wire
[
4
:
0
]
shamt
=
instr
[
24
:
20
];
//处理mux
mux2
#(
32
)
mx0
(
rdata2
,
immout
,
alusrcb
,
b
);
//alu input b
mux2
#(
32
)
mx1
(
aluout
,
readdata
,
memtoreg
,
wdata
);
// wdata input
mux3
#(
32
)
mx2
(
rdata1
,
0
,
pc
,
alusrca
,
a
);
//alu input a
mux2
#(
5
)
mx3
(
rdata2
[
4
:
0
],
instr
[
24
:
20
],
itype
,
shamt
);
//alu input shamt
//
mux2 #(5) mx3(rdata2[4:0], instr[24:20], itype, shamt); //alu input shamt
imm
im
(
iimm
,
simm
,
bimm
,
uimm
,
jimm
,
immctrl
,
immout
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment