There is a single register internally for both inp...
# caravel
m
There is a single register internally for both input and output. If that was duplicated, you could have 128 input and 128 output simultaneously rather than 128 input/outputs.
t
I did fix it so that it has 128 inputs and 128 outputs.
You should be able to see that difference in the code between the caravel for MPW-one and MPW-two.
m
@Tim Edwards But when you do a read, it interleaves the input and the output register depending on oen, unless I'm misreading.
I guess the procedure is: 1) set oen to FFF..FF 2) write all the output bits 3) set oen to 000..00 4) read all the input bits I just thought having separate addresses would be easier than changing the oen register each time. It would be 1/2 the bus transactions
t
Previously, la_wb.v had, at line 141 (and similarly below that):
Copy code
if (la_data_sel[0]) begin
    iomem_rdata <= la_data_0 | (la_data_in[31:0] & la_ena_0);
I determined that there was no need for
iomem_rdata
to read
la_data_0
if
la_data_0
was a known value anyway, so I changed it to
Copy code
if (la_data_sel[0]) begin
    iomem_rdata <= la_data_in[31:0];
Which means that you still have one address, but the registered value is output only, and if you read from that address you get what's on the logic analyzer line, not the registered value.
👍 1
m
Ohhh, so I must still have the MPW one version for some reason
When you install caravel-lite using caravel_user_project it uses the main branch, not the mpw-two-c tagged branch...
@Tim Edwards ^^
t
I'll make a note to point this out and get it fixed.
👍 1
I'm kind of surprised that it would work that way and not raise errors from the several updates made to the pins going into the user project area, such as the new IRQ pins. But they could be left floating and it wouldn't matter, so maybe it does work without raising an error.
m
I wasn't debugging everything in my tests for this, just connectivity of the SRAM macros
m
I'm pretty sure the right tag is installed. Maybe you have an old install? Mine works with irqs
m
@Matt Venn I was looking at the makefile on GitHub that installs the main branch with no tag...
m
Hmm yeah it's a little strange. The submodule is the correct commit but then the install instructions try to checkout another version
image.png
main and mpw-two-c are both at the same commit
more confusing than it needs to be. Just use the correct commit of the submodule is enough I would have thought