Replies: 4 comments 1 reply
-
Hi there @Luperior super interesting thesis project! I wished I had such a thesis. :) |
Beta Was this translation helpful? Give feedback.
-
Thank you so much @NikLeberg for all your enthusiasm!
Thank you again for your help! |
Beta Was this translation helpful? Give feedback.
-
Hey @Luperior! This really sounds like an interesting project! Here are some thought about this: Do not use I agree with @NikLeberg. Do not change the CPU logic itself and implement the TMR system as part of the bus system (and not inside the CPU). This is where I would put the TMR module (red line): All the buses of the three core complexes go into the TMR block. There, a majority logic is implemented. If the data to-be-written is identical across all three ports the memory access is actually forwarded to the further bus system (the DMA switch in this example). You can do that by gating the Btw, you are building a setup with three identical cores doing the same stuff at the same time. There is a (tiny?) chance that the synthesis tool is smart enough to identify this redundancy removing all but one cores. |
Beta Was this translation helpful? Give feedback.
-
I'm guessing you mean INOUT right? Anyway thank you both, I'll change that.
I think I get what you mean but I'm just not sure about why my current implementation doesn't work. I mean, I am not enabling and disabling memory writing with the Could it all be due to the optimization you mentioned that may not instantiate "enough" components as maybe proven by the Issue (#663) ? |
Beta Was this translation helpful? Give feedback.
-
Good afternoon everyone,
for my Master Thesis I am working on a multicore version of the Neorv32 in order to reduce the error probability due to bit flipping in the bitstream. My idea is to triplicate the CPU (done already) and then introduce a Triple Modular Redundancy "security gate" before writing data into memory. Basically I want to compare the results obtained by the three different cores and then store the one which, in case of disagreement, is most obtained (eg 2 times out of 3).
In order to do so, I modified the neorv32_cpu_bus.vhd file by adding a comparison between the result coming from the same core ALU (wdata_i) and the ones coming from the other two cores ALUs (wdata_ix and wdata_iy). Should the three CPUs all produce different results, every single one will store the data obtained by their own ALU. This is the code:
Clearly, in order to make all of this possible, I added two extra IN signals for each CPU (wdata_ix and wdata_iy) and modified the "rs2" signal to be (IN)OUT since it represents the ALU outcome and has to be sent to the other cores. So for example the first core takes in cpu2.rs2 and cpu3.rs2 and outputs cpu1.rs2 and so on... however it does not work.
I am using Vivado to deploy it on a XILINX PYNQ Z2 FPGA and Synthesis and Implementation complete without any major warning (nor error obviously), and the Implemented Design makes total sense. I already tested the code and bistream end everything works fine without the TMR implementation so it shouldn't be a problem caused by the core triplication.
How is it possible then that I obtain nothing coming from the UART0 when I should see the first CPU output (after being "TMR-checked")?
Thank you all in advance!
Edit: I also tried other different approaches, like using Shared Variables or istantiating a new component which played the role of the TMR majority voter. However, let alone that neither of them worked, the first one is likely more subject to errors due to bit flipping and the second one (probably) had synchronisation issues since the values were available a few clocks after they were needed.
Should you have any other suggestions I am open to hear them, thanks!
Beta Was this translation helpful? Give feedback.
All reactions