mirror of
https://gitlab.com/brendanhaines/cpu.git
synced 2024-11-09 21:14:57 -07:00
load (word only) appears to be working
This commit is contained in:
parent
4a25ca6def
commit
f0166f1954
|
@ -256,9 +256,12 @@ always @(*) begin
|
|||
default: s_id_invalid = 1;
|
||||
endcase
|
||||
end
|
||||
// OP_LOAD: begin
|
||||
|
||||
// end
|
||||
OP_LOAD: begin
|
||||
s_id_load = 1;
|
||||
s_id_s1 = regfile[s_id_rs1];
|
||||
s_id_s2 = s_id_immed_itype;
|
||||
// TODO: finish parsing (byte vs word. For now always assume word)
|
||||
end
|
||||
OP_STORE: begin
|
||||
s_id_store = 1;
|
||||
s_id_s1 = regfile[s_id_rs1];
|
||||
|
|
|
@ -468,9 +468,9 @@
|
|||
<obj_property name="ObjectShortName">r_wb_rd[4:0]</obj_property>
|
||||
<obj_property name="Radix">UNSIGNEDDECRADIX</obj_property>
|
||||
</wvobject>
|
||||
<wvobject fp_name="/core_tb/dut/r_wb_ra" type="logic" db_ref_id="1">
|
||||
<obj_property name="ElementShortName">r_wb_ra</obj_property>
|
||||
<obj_property name="ObjectShortName">r_wb_ra</obj_property>
|
||||
<wvobject fp_name="/core_tb/dut/r_wb_ra" type="array" db_ref_id="1">
|
||||
<obj_property name="ElementShortName">r_wb_ra[31:0]</obj_property>
|
||||
<obj_property name="ObjectShortName">r_wb_ra[31:0]</obj_property>
|
||||
</wvobject>
|
||||
<wvobject fp_name="/core_tb/dut/r_wb_load_data" type="array" db_ref_id="1">
|
||||
<obj_property name="ElementShortName">r_wb_load_data[31:0]</obj_property>
|
||||
|
@ -482,6 +482,14 @@
|
|||
<obj_property name="ObjectShortName">r_wb_alu_out[31:0]</obj_property>
|
||||
<obj_property name="Radix">HEXRADIX</obj_property>
|
||||
</wvobject>
|
||||
<wvobject fp_name="/core_tb/dut/r_wb_jump" type="logic" db_ref_id="1">
|
||||
<obj_property name="ElementShortName">r_wb_jump</obj_property>
|
||||
<obj_property name="ObjectShortName">r_wb_jump</obj_property>
|
||||
</wvobject>
|
||||
<wvobject fp_name="/core_tb/dut/r_wb_load" type="logic" db_ref_id="1">
|
||||
<obj_property name="ElementShortName">r_wb_load</obj_property>
|
||||
<obj_property name="ObjectShortName">r_wb_load</obj_property>
|
||||
</wvobject>
|
||||
<wvobject fp_name="/core_tb/dut/s_wb_data" type="array" db_ref_id="1">
|
||||
<obj_property name="ElementShortName">s_wb_data[31:0]</obj_property>
|
||||
<obj_property name="ObjectShortName">s_wb_data[31:0]</obj_property>
|
||||
|
|
50
test/test.S
50
test/test.S
|
@ -210,28 +210,34 @@ test9:
|
|||
|
||||
test10:
|
||||
addi x30, x0, 10 # x30 = 10
|
||||
# # now for some memory stuff
|
||||
# # sw
|
||||
# la x9, someint # x9 = start of .bss
|
||||
# lui x10, 0x12345 # x10 = 0x12345000
|
||||
# addi x10, x10, 0x678 # x10 = 0x12345678
|
||||
# nop
|
||||
# nop
|
||||
# nop
|
||||
# nop
|
||||
# nop
|
||||
# sw x10, 0(x9) # someint = 0x12345678
|
||||
# nop
|
||||
# nop
|
||||
# nop
|
||||
# nop
|
||||
# nop
|
||||
# # lw x11, 0(x9) # x11 = 0x12345678
|
||||
# nop
|
||||
# nop
|
||||
# nop
|
||||
# nop
|
||||
# nop
|
||||
# now for some memory stuff
|
||||
# sw
|
||||
la x9, someint # x9 = start of .bss
|
||||
lui x10, 0x12345 # x10 = 0x12345000
|
||||
addi x10, x10, 0x678 # x10 = 0x12345678
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
lw x11, 0(x9) # x11 = 0xfedcba98
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
sw x10, 0(x9) # someint = 0x12345678
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
lw x12, 0(x9) # x12 = 0x12345678
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
nop
|
||||
|
||||
|
||||
done:
|
||||
|
|
Loading…
Reference in New Issue
Block a user