Gast
#671276
Hallo! Ich studiere Angewandte Informatik und weiß im Fach Digitaltechnik nicht weiter. Folgende Aufgabe ist zu bewältigen: Erstellen Sie unter Verwendung von ‚Precision RTL Sythesis’ ein FPGA-Projekt für den Baustein: Familie: LatticeEC, Typ: LFEC1E, speed grade: -3, Package: TQFP144. Das Design befindet sich in der Quelldatei v01.vhd. Führen Sie die Schritte „setup design“, „compile“, „synthesize“ und „place & route aus. • Ermitteln Sie aus den Report-Dateien des Entwicklungssystems die höchstmögliche Taktfrequenz, mit der das Design v01.vhd betrieben werden kann. • Berechnen Sie die Frequenz, mit der sich das höchstwertigste Bit des Zählers „ccc“ ändert unter der Annahme, das das Taktsignal clk die Frequenz f = 25 MHz besitzt. Bei dem letzten punkt weiß ich nicht was ich machen soll... Hier der v01.vhd code: library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; use ieee.std_logic_unsigned.all; -- Eingangs- und Ausgangssignale des Moduls v01 entity v01 is port( clk: in std_logic ; b_up: in std_logic; b_left: in std_logic; c_data: out integer range 0 to 255; dp_10: out std_logic ; dp_11: out std_logic ; q: out std_logic_vector ( 6 downto 0 ); p: out std_logic_vector ( 6 downto 0 ); d: out std_logic_vector ( 6 downto 0 ) ); -- Zuordnung der Ein-/Ausgangssignale zu Pin- Nummern des FPGA-Bausteins LFEC1E-3T144C -- general attribute set-up attribute pin_number : string; type exemplar_string_array is array (natural range <>, natural range <>) of character ; attribute array_pin_number : exemplar_string_array ; -- inputs attribute pin_number of clk : signal is "9"; attribute pin_number of b_up : signal is "50"; attribute pin_number of b_left : signal is "51"; -- outputs attribute pin_number of dp_10 : signal is "115"; attribute pin_number of dp_11 : signal is "101"; attribute array_pin_number of q: signal is ("111","112","113","114","116","118","119"); attribute array_pin_number of d: signal is ("100","102","103","104","105","106","107"); attribute array_pin_number of p: signal is ("135","137","138","139","140","141","142"); attribute array_pin_number of c_data: signal is ("27","29","30","31","32","33","34","35"); end v01; -- Ende der Signalbeschreibung -- Beschreibung der logischen Funktionen des Moduls v01 architecture behavior of v01 is -- Liste der internen Signale und Konstanten signal cnt: integer range 0 to 65534; signal scnt: integer range 0 to 2048; signal ccc: integer range 0 to 255; signal i_clk: std_logic ; constant s0: std_logic_vector:= "0000000"; constant s1: std_logic_vector:= "1000000"; constant s2: std_logic_vector:= "0100000"; constant s3: std_logic_vector:= "0010000"; constant s4: std_logic_vector:= "0001000"; constant s5: std_logic_vector:= "0000100"; constant s6: std_logic_vector:= "0000010"; constant s7: std_logic_vector:= "0000001"; begin -- Clock- Teiler process (clk) begin if (clk'event and clk = '1' ) then cnt <= cnt + 1; if (cnt = 32767) then i_clk <= '1'; end if; if (cnt = 0 ) then i_clk <= '0'; end if; end if; end process; -- Zähler mit Dekoder und Ausgangsregistern für LED's und 7-Segmentdisplays process (i_clk) begin if (i_clk'event and i_clk = '1' ) then ccc <= ccc + 1; c_data <= ccc; scnt <= scnt + 1; if (scnt >= 0) and (scnt < 256) then q <= not(s1) ; d <= not(s1); p <= s1; end if; if (scnt >= 256) and (scnt < 512) then q <= not(s2) ; d <= not(s2); p <= s2; end if; if (scnt >= 512) and (scnt < 768) then q <= not(s3) ; d <= not(s3); p <= s3; end if; if (scnt >= 768) and (scnt < 1024) then q <= not(s4) ; d <= not(s4); p <= s4; end if; if (scnt >= 1024) and (scnt < 1280) then q <= not(s5) ; d <= not(s5); p <= s5; end if; if (scnt >= 1280) and (scnt < 1536) then q <= not(s6) ; d <= not(s6); p <= s6; end if; if (scnt >= 1536) and (scnt < 1792) then q <= not(s7) ; d <= not(s7); p <= s7; end if; if (scnt >= 1792) and (scnt < 2048) then q <= not(s0) ; d <= not(s0); p <= s0; end if; end if; end process; -- Ansteuerung der Dezimalpunkte mit Tastern dp_10 <= b_up; dp_11 <= b_left; end behavior; Würde mich über jede Hilfe freuen! Gruß Tobi