VHDL-Forum

 
Sie sind nicht eingeloggt.
LoginLogin Kostenlos anmeldenKostenlos anmelden
BeiträgeBeiträge MembersMitglieder SucheSuche HilfeHilfe
VotesUmfragen FilesDateien CalendarKalender BookmarksBookmarks
Register will not synthetize...

Anfang   zurück   weiter   Ende
Autor Beitrag
Heikki
Gast
New PostErstellt: 06.10.04, 12:51  Betreff: Register will not synthetize...  drucken  Thema drucken  weiterempfehlen Antwort mit Zitat  

Can anyone tell why this kind of 12-bit pipo register won't synthetize in ModelSim:

library ieee;
use ieee.std_logic_1164.all;

entity reg_12 is
port( input: in std_logic_vector( 11 downto 0);
sys_clk, reset, sample_rate: in std_logic;
output: out std_logic_vector( 11 downto 0));
end reg_12;

architecture RTL of reg_12 is

begin

p0: process(sys_clk, reset, sample_rate)

variable reg: std_logic_vector( 11 downto 0);

begin
if( reset = '1') then
reg := ( others => '0');
elsif rising_edge( sys_clk) then
if (sample_rate = '1') then
reg := input;
end if;
end if;

output <= reg;
end process p0;
end RTL;

ModelSim says: Error: Tried to use a synchronized value in call to '<=' and points to line:
output <= reg;

Thank you!
nach oben
burn77
Registrierter Benutzer


Beiträge: 4

New PostErstellt: 06.10.04, 13:19  Betreff: Re: Register will not synthetize...  drucken  weiterempfehlen Antwort mit Zitat  

I think, you just have to use a shared variable, I am not sure, but I think so. Hope, you have luck...
And you have to change the position of declaration of reg. Downwards, you can see it within the "=" lines


    Zitat:
    Can anyone tell why this kind of 12-bit pipo register won't synthetize in ModelSim:

    library ieee;
    use ieee.std_logic_1164.all;

    entity reg_12 is
    port( input: in std_logic_vector( 11 downto 0);
    sys_clk, reset, sample_rate: in std_logic;
    output: out std_logic_vector( 11 downto 0));
    end reg_12;

    architecture RTL of reg_12 is
    ==============================================
    shared variable reg: std_logic_vector( 11 downto 0);
    ==============================================
    begin

    p0: process(sys_clk, reset, sample_rate)


    begin
    if( reset = '1') then
    reg := ( others => '0');
    elsif rising_edge( sys_clk) then
    if (sample_rate = '1') then
    reg := input;
    end if;
    end if;

    output <= reg;
    end process p0;
    end RTL;

    ModelSim says: Error: Tried to use a synchronized value in call to '<=' and points to line:
    output <= reg;

    Thank you!
nach oben
Benutzerprofil anzeigen Private Nachricht an dieses Mitglied senden
marketing99
Junior-Mitglied


Beiträge: 11

New PostErstellt: 04.04.20, 10:43  Betreff: Re: Register will not synthetize...  drucken  weiterempfehlen Antwort mit Zitat  

100 سایت های تبلیغاتی رایگان

چگونه از صحت نماد اعتماد الکترونیکی مطمئن شویم

مس مارکتینگ چیست

جديدترين تکنيک هاي ديجيتال مارکتينگ

چگونه اینفوگرافیک بسازیم؟


[editiert: 15.03.21, 08:00 von marketing99]
nach oben
Benutzerprofil anzeigen Private Nachricht an dieses Mitglied senden
Sortierung ndern:  
Anfang   zurück   weiter   Ende
Seite 1 von 1
Gehe zu:   
Search

powered by carookee.com - eigenes profi-forum kostenlos

Design © trevorj