Hallo! Ich habe ein Verilog-Modul, welches auch Parameter enthält: ***************** module m (inputs, outputs, ...); parameter WIDTH = 32; ***************** Dieses Modul soll nun in VHDL instanziert werden. ************** m1: m port map (inputs, outputs) ************** Kann mir jemand bitte erklären, wie ich dem Verilog Modul einen anderen Wert für diesen Parameter geben kann? Das sollte doch mit einer generic map gehn, oder hab ich da was falsch verstanden? Danke für die Hilfe, MW
Gast
#500620
siehe Bücher/Links auf: http://www.mikrocontroller.net/articles/Programmierbare_Logik
Gast
#500621
sorry falsches Fenster
Gast
#500652
generic map ist vhdl, in verilog macht man das wohl mit defparam. Also beispiel die instanzierung eines brams in vhdl und v (aus xilinx Library guide): vhdl:
1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
7 | |
8 | |
9 | |
10 | |
11 | |
12 | |
13 | |
14 | |
15 | |
16 | |
17 | |
18 | |
19 | |
20 | |
21 | |
verilog: RAM16X1D RAM16X1D_inst ( .DPO(DPO), // Port A 1-bit data output .SPO(SPO), // Port B 1-bit data output .A0(A0), // Port A address[0] input bit .A1(A1), // Port A address[1] input bit .A2(A2), // Port A address[2] input bit .A3(A3), // Port A address[3] input bit .D(D), // Port A 1-bit data input .DPRA0(DPRA0), // Port B address[0] input bit .DPRA1(DPRA1), // Port B address[1] input bit .DPRA2(DPRA2), // Port B address[2] input bit .DPRA3(DPRA3), // Port B address[3] input bit .WCLK(WCLK), // Port A write clock input .WE(WE) // Port A write enable input ); // The following defparam INIT declaration is only necessary if you // wish to change the initial contents of the RAM to anything other // than all zero's. If the instance name for the RAM is is changes, // that change needs to be reflected in the defparam statement. defparam RAM16X1D_inst.INIT = 16'h0000; Man beachte die zuweisung an INIT! Ob man einem in verilog definierten parameter in vhdl einen wert zuweisen kann, ist mir unbekannt.
Antwort schreiben
Bitte melde dich an, um einen Beitrag zu schreiben.