Showing posts with label FPGA. Show all posts
Showing posts with label FPGA. Show all posts

Oct 14, 2018

Simple and efficient FPGA reset method (reset for records)

I hope you are using VHDL records extensively. They are not as powerful as SystemVerilog data types and interfaces, but it's a huge step forward from individual bits and bit arrays of Verilog. I don't understand why some people use VHDL and don't use this feature of VHDL! Records make your code significantly clearer and crisper. They reduce risk of forgetting to assign a value to a signal of a complex data bus and make your description 10 times shorter while improving readability.

Jun 22, 2018

Minimalistic resets coding style


I wanted to write a post about resetting signals of complex types, but I decided that I have to write two other ones to make sure that we are on the same page.

There is a nice document called Get Smart About Reset: Think Local, Not Global. If you haven't read it yet - do it. One of its points - eliminate as much unnecessary resets as you can.
My experience says me that resets cause big problems in big high speed designs, and I always try to reduce number of resettable registers.
But there is a trap. Let's consider this code (VHDL, but for Verilog all this works the same way):

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
process(clk) is
begin
   if rising_edge(clk) begin
      if rst = '1' then
         a <= '0';
      else
         a <= somecode;
         b <= someothercode;
      end if;
   end if;
end process;

Jun 18, 2018

Unsafe FPGA/ASIC neighbors

Do you remember Spectre/Meltdown? Unsafe code on your processor can indirectly access data in memory locations which should have been isolated from the code.
Similar things can happen in FPGA/ASIC world. It can be that your sensitive data (e.g. ciphering keys) are used in your IP and there is another (rogue) IP on the same device. For example, you bought an IP from a malicious vendor, or you are sharing a big FPGA with an attacker on some cloud infrastructure.
Despite that your IPs are logically separated, they share the power distribution network of the device and variation in power consumption of your core, correlated with your sensitive data can be sensed by the other core using signal propagation speed/voltage dependency.

More details in the article
An Inside Job: Remote Power Analysis Attacks on FPGAs
Falk Schellenberg, Dennis R.E. Gnad, Amir Moradi, and Mehdi B. Tahoori