load (word only) appears to be working

This commit is contained in:
Brendan Haines 2020-11-14 23:13:24 -07:00
parent 4a25ca6def
commit f0166f1954
3 changed files with 45 additions and 28 deletions

View File

@ -256,9 +256,12 @@ always @(*) begin
default: s_id_invalid = 1; default: s_id_invalid = 1;
endcase endcase
end end
// OP_LOAD: begin OP_LOAD: begin
s_id_load = 1;
// end 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 OP_STORE: begin
s_id_store = 1; s_id_store = 1;
s_id_s1 = regfile[s_id_rs1]; s_id_s1 = regfile[s_id_rs1];

View File

@ -468,9 +468,9 @@
<obj_property name="ObjectShortName">r_wb_rd[4:0]</obj_property> <obj_property name="ObjectShortName">r_wb_rd[4:0]</obj_property>
<obj_property name="Radix">UNSIGNEDDECRADIX</obj_property> <obj_property name="Radix">UNSIGNEDDECRADIX</obj_property>
</wvobject> </wvobject>
<wvobject fp_name="/core_tb/dut/r_wb_ra" type="logic" db_ref_id="1"> <wvobject fp_name="/core_tb/dut/r_wb_ra" type="array" db_ref_id="1">
<obj_property name="ElementShortName">r_wb_ra</obj_property> <obj_property name="ElementShortName">r_wb_ra[31:0]</obj_property>
<obj_property name="ObjectShortName">r_wb_ra</obj_property> <obj_property name="ObjectShortName">r_wb_ra[31:0]</obj_property>
</wvobject> </wvobject>
<wvobject fp_name="/core_tb/dut/r_wb_load_data" type="array" db_ref_id="1"> <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> <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="ObjectShortName">r_wb_alu_out[31:0]</obj_property>
<obj_property name="Radix">HEXRADIX</obj_property> <obj_property name="Radix">HEXRADIX</obj_property>
</wvobject> </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"> <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="ElementShortName">s_wb_data[31:0]</obj_property>
<obj_property name="ObjectShortName">s_wb_data[31:0]</obj_property> <obj_property name="ObjectShortName">s_wb_data[31:0]</obj_property>

View File

@ -210,28 +210,34 @@ test9:
test10: test10:
addi x30, x0, 10 # x30 = 10 addi x30, x0, 10 # x30 = 10
# # now for some memory stuff # now for some memory stuff
# # sw # sw
# la x9, someint # x9 = start of .bss la x9, someint # x9 = start of .bss
# lui x10, 0x12345 # x10 = 0x12345000 lui x10, 0x12345 # x10 = 0x12345000
# addi x10, x10, 0x678 # x10 = 0x12345678 addi x10, x10, 0x678 # x10 = 0x12345678
# nop nop
# nop nop
# nop nop
# nop nop
# nop nop
# sw x10, 0(x9) # someint = 0x12345678 lw x11, 0(x9) # x11 = 0xfedcba98
# nop nop
# nop nop
# nop nop
# nop nop
# nop nop
# # lw x11, 0(x9) # x11 = 0x12345678 sw x10, 0(x9) # someint = 0x12345678
# nop nop
# nop nop
# nop nop
# nop nop
# nop nop
lw x12, 0(x9) # x12 = 0x12345678
nop
nop
nop
nop
nop
done: done: