0

I want to see the power consumption of memory access in my code. My code is synthesized to a RAM128*1 in ISE (xilinx synthesis tool). I'm working on Spartan3 (3s400) and I just completed the ucf file and add a clock period in timing constrains tab.

My Code :

entity SRAM is
  port(
    clk  : in std_logic;
    wr   : in std_logic;
    din  : in std_logic;
    dout : out std_logic;
    addr : in integer range 0 to 127
  );
end SRAM;

architecture Behavioral of SRAM is
    type matrix is array (0 to 127) of std_logic;
    signal mem : matrix;
    begin
        process(clk)
            begin
            if clk = '1' and clk'event then
                if wr = '1' then
                    mem(addr) <= din;
                end if;
            end if;
    end process;
    dout <= mem(addr);
end Behavioral;

-

Power report :

enter image description here

-

The following image is related to the Logic power consumption with details provided by Xilinx XPower Analyzer :

enter image description here

My question is why the (Logic) power is zero ? How can I see the power related to memory access that depends on size of memory?

Amir
  • 507
  • 3
  • 12
  • Your design has no logic (14 out of 7168). I don't know why there is no report row for BlockRAMs. Can you add some more logic? Let's say some adders or xors to dout? – Paebbels Dec 13 '14 at 13:14
  • 1
    Oh, sorry you are using LUT-RAM, not BlockRAM. I think you schould increese your design size to see some changes. – Paebbels Dec 13 '14 at 13:17
  • possible duplicate of [Why dynamic power consumption is always zero?](http://stackoverflow.com/questions/27383269/why-dynamic-power-consumption-is-always-zero) – Paebbels Dec 13 '14 at 13:20
  • No, I don't have the same warnings like (Why dynamic power ....). I used clock period in constrains tab and fixed that. This question is different. Thanks for comments. – Amir Dec 13 '14 at 13:27
  • Yes, the warning are gone / solved, but the question is still open: Why is there less or no power consumption. I think you could have altered / developed your original question. So I marked this question for moderation - it's not a decision! – Paebbels Dec 13 '14 at 13:33
  • 1
    According to your second comment I increased the size of memory and some changes was happened. (Logic : 0.02 mW) Do you think (logic power) in power report is related to memory access ? If yes, you fixed my problem. – Amir Dec 13 '14 at 13:46
  • 1
    The original design has 128 bit stored in 128 rows and one column of memory. As you described, you are using synchronous writing and asynchronous reading -> this will translate to LUT-RAM. one LUT can hold 32 bits, so 128 bits need 4 LUTs, which are combined in one Slice. The address selection and output multiplexing is done by the F7MUXs and F8MUX in the slice. So your design employees only one slice, which has a very poor power consumption (less then 0.01 mW, otherwise you would have seen it). If you increase the memory size, more LUTs are needed from different Slices. – Paebbels Dec 13 '14 at 13:53
  • Uh, did I make a mistake, didn't I? Has your Spartan-3 LUT4 or LUT6 primitives? – Paebbels Dec 13 '14 at 13:56
  • 1
    I think, before increasing size of memory, power was simply too small to report (<0.005 mw). What size of memory gave 0.02mw? –  Dec 13 '14 at 13:59
  • Memory with size of 1024*1 has 0.02 mW power. In the "View Technology schematic" I can see 4 LUT3 (before memory to control write) and 4 Mram (ram32*1) and 2 LUT3 (after memory). where can I see information about LUT4 or LUT6? Is it in synthesis report ? – Amir Dec 13 '14 at 14:25
  • 2
    I looked it up: Spartan3 FPGAs have LUTs with 4 inputs, that means each LUT can store up to 16 bits. A Spartan3 Slice has 2 LUTs which gave 32 bit of memory. (UG331 page 204) These LUTs are called 4-input LUT or LUT4. Newer Virtex,Artix, Kintex and Zynq devices have LUT6. – Paebbels Dec 13 '14 at 18:14
  • Thanks a lot. You helped me a lot. Why don't you write your comments as an answer. My problem has been solved and I'll confirm your answer. – Amir Dec 13 '14 at 18:28
  • 1
    I thought, my comments are not enough to write a answer, otherwise I would have done this ;) -- If you have enough reputation you can give me a helpful flag (arrow up at a comment) :) – Paebbels Dec 14 '14 at 01:58

0 Answers0