t-crest / patmos

Patmos is a time-predictable VLIW processor, and the processor for the T-CREST project
http://patmos.compute.dtu.dk
BSD 2-Clause "Simplified" License
135 stars 72 forks source link

LLSC Shared scratchpad memory #37

Closed davla closed 6 years ago

davla commented 6 years ago

This is a pull request that adds a shared scratchpad memory supporting Load-Linked and Store-Conditional.

The result of the last Store-Conditional can be read at the address after the last one of the memory itself. For example, in a 1024 bytes scratchpad memory, the result can be read at address 1024.

At least, this is what should happen. The Chisel tests in SharedLLSCSpm.scala and LLSCSpm.scala are successful, but the one in the C program aba_test.c is not. We tried with different sizes and we even mapped the results to other addresses, but it still does not work. We assume that there are some problems with plumbing, probably in the way the spm is mapped in the address space, maybe caused by the fact that the total number of addresses is not a power of 2.

schoeberl commented 6 years ago

If i does not work I would not like to merge it into master.

Thanks, Martin