Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

VHDL issues

Name: Anonymous 2006-12-09 3:13

i'm making a cache for my VHDL class. problem is i'm a moron and apparently don't understand VHDL at all. so there is

    tag_ram: entity    work.tag_RAM(behav)
        port map(address => Paddress(9 downto 2),
            WRITE_ACTIVE_HIGH => NOTPRW,
            ENABLE => TAGENABLE,
            new_tag => Paddress(15 downto 10),
            tag => TAGDATAOUT);

but the only important part of this is that when TAGENABLE is high then TAGDATAOUT is supposed to end up with some value set to it, it does so through this piece of code:


    main : process(address, WRITE_ACTIVE_HIGH, ENABLE, new_tag) is
    begin
        if (WRITE_ACTIVE_HIGH = '0' and ENABLE = '1') --read
        then
            tag <= MEM(to_integer(address)) after 1 ns;
        end if;
        if (WRITE_ACTIVE_HIGH = '1' and ENABLE = '1') --write
        then
            MEM(to_integer(address)) <= new_tag after 1 ns;
        end if;
    end process main;


which for some reason never seems to figure out that TAGENABLE got set to one.  i have report statements in the real version of the code that basically suggest this code gets "stuck" before it can figure out that TAGENABLE went to one. if anyone knows enough about VHDL to guide me i'd be grateful.

Name: OP 2006-12-10 3:25

        if (WRITE_ACTIVE_HIGH = '0' and ENABLE = '1') --read
        then

            report "**Tag ram returns address:" & to_string(address) & " with value:" & to_string(MEM(to_integer(address)));

            tag <= MEM(to_integer(address)) after 1 ns;
        end if;


of particular importance is that report, during the execution i get this report:

# ** Note: **Tag ram returns address:00110011 with value:UUUUUU
#    Time: 2 ns  Iteration: 1  Instance: /testbench/main_cache/tag_ram

where 00110011 is the address i have my testbench requesting, UUUUUU is the value in the memory (since this is the very first data request) and the tagdataout should also be UUUUUU at first. i am wondreing if maybe active does not handle assignments to "U" but only to 0 and 1 perhaps?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List