-
Thread
Ein wirklich blöder Fehler, den ich nicht sehe
is port( BTN : in std_logic; LED : out std_logic_vector(7 downto 0) := (others => '0') ); end entity Debounce_Test; [/vhdl] das "(others => '0')" macht hier etwas völlig anderes, als anscheinend von allen angenommen. Am dichtesten dran (aber immer noch auf dem Holzweg
LED <= (cnt => '1', others => '0'); -- end process; -- -- Diamond: Err choice is not constant / XST Err: Choices must be locally static -- -- ISIM: statisch "00100000" -- LED <= (cnt => '1', others => '0'
-
Thread
SPI und SCK Problem
die Initialisierung des SPI: [c] DDRB = (1<<PB5) | (1<<PB7); //Set MOSI and SCK output, all others input DDRB |= (1<<PB4);// configure the CS Pin as output as not to affect the SPI /* initialize SPI Control Registers */ SPCR |= (1<<SPE); //enables SPI functionality SPCR &= ~(1<<
*** ENDE sei(); DDRB = (1<<PB5) | (1<<PB7); //Set MOSI and SCK output, all others input DDRB |= (1<<PB4); // configure the CS Pin as output as not to affect the SPI /* initialize SPI Control Registers */ SPCR |= (1<<SPE); //enables SPI functionality
-
Thread
Taschenrechner in VHDL
variable zahl: unsigned(15 downto 0); Begin case state_zahl is when zahl1_state => zahl(3 downto 0) := unsigned(eingabe); state_zahl <= zahl2_state; when zahl2_state => zahl := shift_left(zahl
downto 0) := unsigned(eingabe); state_zahl <= zahl1_state; when others => state_zahl <= zahl1_state; end case; ausgabe(15 downto 0) <= std_logic_vector(zahl); end process verarbeitung; [/vhdl]
-
Thread
Adder/Subtracter Map Problem
architecture Behavioral of AdderSubtracter is begin y <= STD_LOGIC_VECTOR(UNSIGNED(a)+UNSIGNED(b)) when sel = "00" else STD_LOGIC_VECTOR(SIGNED(a)+SIGNED(b)) when sel = "01" else STD_LOGIC_VECTOR(UNSIGNED(a)-UNSIGNED(b)) when sel = "10" else STD_LOGIC_VECTOR(SIGNED(a)-SIGNED(b)) when sel = "11" else (others => '0'); end Behavioral; ----------------------------------------------- [/vhdl] Die Constaints Datei sieht so aus: [vhdl] ######################
-
Thread
VIVADO 2017.1
aber 2016.4: ERROR: [VRFC 10-2335] selected assignment statement does not cover all choices. 'others' clause is needed [D:/vhdl/TEM_uni_5_stream/TEM_uni_5_stream.srcs/sources_1/TEM_uni_5_adc_stream.vhd:206] [vhdl]with ADC_select select ADC_data <= fifo_counter when "000", AD7356_1_data when "001", AD7356_2_data when "010", AD7356_3_data when "011", AD7356_4_data when "100", AD7356_5_data when "101", AD7356_6_data when "110", fifo_counter when "111";[/vhdl]
-
Thread
Open Bench Logic Sniffer - FPGA läuft nicht an
reset_shreg(reset_shreg'left); if async_reset = '1' then reset_shreg <= (others => '1'); end if; end process; reset_n <= not reset; [/vhdl] Duke
do mention to try another USB cable or even another USB Port. But as you have the strange error when mounting it in a case , i'd say a solder defect on the board. /Bingo
-
Thread
If und Port-Map Problem
1100110"; when "0101" => led <= NOT "1101101"; when "0110" => led <= NOT "1111101"; when "0111" => led <= NOT "0000111"; when "1000" => led <= NOT "1111111"; when "1001" => led <= NOT "1101111"; when others => led <= "ZZZZZZZ"; end case; end if; end process; end behv; ------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; use
-
Thread
State Machine mit 2 Clocks
States.) [c] --state machine process. process (current_s,input) begin case current_s is when ready => --when current state is "ready" output <= '0'; if(input ='1') then next_s <= steady; else next_s <= ready; end if; when steady =>;
change. end if; end process; process (clk1,clk2,current_s) is begin case current_s is when ready => clk_temp <= clk1; when steady => clk_temp <= clk2; when others => clk_temp <= clk1; end case; end process; [/c] Bernd
-
Thread
1-Bit-Komparator als Komponente für n-Bit-Komparator
--Hilfsvektor END GENERATE SCHLEIFE; --Größer ZOUT(2) <= '1' WHEN Hi>Lo ELSE '0'; --Gleich ZOUT(1) <= '1' WHEN Eq=EqH ELSE '0'; --Kleiner ZOUT(0) <= '1' WHEN Lo>Hi ELSE '0'; end architecture verhalten;
Da ich keine "=" Operation beim std_logic_vector > machen konnte, sonst ginge ja: Ausgang <= '1' WHEN Vector = (N-1); Ausgang <= '1' WHEN Vector = (others => '1'); sollte gehen. Für beliebige integer geht es auch, mit ein paar Typumwandlungen. Je nachdem, welche library du für std_logic verwendest
-
Thread
Zwei RC-Glieder seriell - Spannung am zweiten Kondensator?
that I don't have the skills to understand how to do that. > I hope this will be helpful to the others. OK. When the student is ready, the teacher will appear :) It's a well-known technique in Laplace transform. It allows inserting initial conditions into the circuit by connecting artificial sources
know any way without transforming it to state space representation. Note, this really only works when the circuits are perfectly decoupled which is not often the case for electric circuits :)
-
Thread
Schon wieder synchron/asynchron.
[c] begin CPUCLK <= CharColumn(0); -- CPU Clock 3.5MHz CPUWAIT <= '0' when VideoRead1 = '1' and VRAM_ACC = '1' else '1'; ROM <= '0' when MREQ = '0' and A15 = '0' and A14 = '0' else '1'; RAM <= '0' when MREQ = '0' and A15 = '1' and VRAM_ACC = '0' else '1'; VRD <= '0' when (VRAM_ACC = '1' and RD = '0') or VideoRead2 = '1' else '1'; VWR <= '0' when (VRAM_ACC = '1' and WR = '0') and VideoRead = '0' else '1'; VRAM_ACC <= '1' when MREQ = '0' and (RAM5 = '1' or RAM7
-
Thread
SPI will auf AVR nicht laufen
> #include <avr/interrupt.h> void SPI_MasterInit(void) { /* Set MOSI and SCK output, all others input */ DDRB = (1<<5) | (1<<3) | (1<<2); /* Enable SPI, Master, set clock rate fck/16 */ SPCR = (1<<SPE)|(1<<MSTR)|(1<<SPR0); } void SPI_MasterTransmit(char cData) { /* Start transmission
Maci M. schrieb im Beitrag #6421531: > /* Set MOSI and SCK output, all others input */ > DDRB = (1<<5) | (1<<3) | (1<<2); Du setzt außer MOSI und SCK noch einen Pin. Wahrscheinlich SS. Nur mal so als Idee, lass SS oder benutze einen anderen Pin. Vielleicht gibt es da Probleme
-
Thread
1 Byte in dual 7 Segment Anzeige übersetzen
"1011011" when x"5", "1011111" when x"6", "1110000" when x"7", "1111111" when x"8", "1111011" when x"9", "0000000" when others; ... [/vhdl] Wer es noch weiter treiben will, definiert sich für die Segmente passende Konstanten: [vhdl] ... constant seg_a : std_logic_vector( 6 downto 0) := "1000000"; constant
-
Thread
CVSD Encoder in Fixpoint
product2 : sfix3014; begin if rising_edge(clock) then case state is when init_state => if reset = '1' then estimatedSignal <= (others => '0'); encStep <= (others => '0');
end if; state <= overload_state; when overload_state => overload <= (cvsd(0) and cvsd(1) and cvsd(2)) or (not cvsd(0) and not cvsd(1) and not cvsd(2)); if overload = '1'
-
Thread
Synthese macht nicht das selbe wie Simulation und "logische" Analyse
..... Dieser Prozess ist lediglich auf den clk2 sensitiv. > data_shift_reg(63 downto 0) <= (others => '0'); Das ginge kürzer so: data_shift_reg <= (others => '0');
kannst du sicher schon bei der > Übertragung jedes einzelnen Bits berechnen: > [vhdl] > when save => > bit_cnt <= bit_cnt + 1; -- > Gesampelte Bits > data_shift_reg <= data_shift_reg(62 downto 0) & > demod_sync(0); > [/vhdl] > Denn
-
Thread
Syntax Error HDL Compiler 806
std_logic; begin process(clk, reset) begin if reset='1' then clk163_reg <= (others => '0'); else if (clk 'event and clk='1') then clk163_reg <= clk163_next; end if; end process; clk163_next <= (others=>'0') when clk163_reg=(div-1) else clk163_reg + 1; s_pulse <= '1' when clk163_reg=0 else '0'; end Behavioral; [/vhdl]
-
Thread
Speed Optimierung !!!
0); begin -- 1. Version: process(CLK1, RES1) begin if RES1 = '1' then QINT1 <= (others => '0'); elsif CLK1'event and CLK1 = '1' then QINT1 <= QINT1 +1; end if; end process; -- 2. Version: process(CLK2, RES2) begin if RES2 = '1' then QINT2 <= (others =>
end process; -- 3. Version: process(CLK3, RES3) begin if RES3 = '1' then QINT3 <= (others => '0'); elsif CLK3'event and CLK3 = '1' and CLK3'last_value = '0' then QINT3 <= QINT3 +1; end if; end process; Q1 <= QINT1; Q2 <= QINT2; Q3 <= QINT3; end verhalten; [/VHDL
-
Thread
warnungen nach synthese
begin if AR='1' then state <= "000" ; elsif rising_edge(clock) then case state is when "000" => if start = '1' then state <= "001" ; --else state <="000" ; end if; when "001" => state <= "010" ; led_1 <='1'; when "010" => state <= "011" ; led_2 <='1'; when "011" => state <= "100" ; led_3 <='1'; when "100" => state <= "101" ; led_4 <='1'; when "101" => state <= "110" ; led_5 <='1'; when "110" => state <= "111" ; led_6 <='1'; when "111" => state <= "001" ; led_7 <='1'; when others
-
Thread
State Machine hat 2 zustände gleichzeitig
r_wrreq <= '0'; c_state <= Idle; color <= "00000000"; end if; when Start => r_wrreq <= '1'; c_state <= R; color <= red; when R => r_wrreq <= '1'; c_state <= G; color <= green; when G =>
c_state <= Idle; else c_state <= Waiting; end if; when others => c_state <= Idle; r_wrreq <= '0'; color <= "00000000"; end case; end if;[/vhdl] clk_disp hat ca. 6.6MHz; clk50 50 MHz; red, gree und blue sind
-
Thread
verilog bufif1 in VHDL?
Umsetzen bin ich auf ein [c]bufif1[/c] gestoßen. Ist das tatsächlich nur ein [vhdl]out <= in WHEN (en = '1') ELSE (OTHERS => "Z");[/vhdl] ? Oder steckt da mehr dahinter? Danke schon mal!
Markus F. schrieb im Beitrag #3922764: > > Ist das tatsächlich nur ein > [vhdl]out <= in WHEN (en = '1') ELSE (OTHERS => "Z");[/vhdl] > ? Im Prinzip ja. Könnte sich nur für den Fall in = 0 oder 1, und en = "U" oder "Z" unterscheiden. In diesem Falle wird out = in oder "Z" je nach Laune
-
Thread
Flankenerkennung von positiver & negativer Flanke
"; begin process begin wait until rising_edge(clk); case (state) is when "00" => if (inp='0') then state<="01"; end if; -- when "01" => if (inp='1') then state<="10"; end if; when "01" => if ((inp'event and inp = '0') or (inp'event and inp = '1')) then
and BTN0 = '0' then state_button <= "11"; else state button <= "00"; end if; when "11" => state_button <="00"; save_cnt <= select_cntMSECs10; when others => Null; end case; end if; end process; [/vhdl] Vielen Gruesse, Fellap
-
Thread
VHDL - Lookuptable indizieren
, returning 0 Ich würde mal sowas probieren: [vhdl] signal acc : unsigned(31 downto 0) := (others=>'0'); -- phase accumulator [/vhdl] Zum Nachdenken: welchen Wert hat /acc/ ohne Initialisierung? Wie könnte dieser Wert in einen /Integer/ umgewandelt werden?
willst ist eher: [vhdl] use ieee.numeric_std.all; ... signal incr : unsigned(...) := (others => '0'); clock <= not clock after 5 ns; incr <= incr + 1 when rising_edge(clock); [/vhdl]
-
Thread
Matrix LED Steuerung funktioniert nicht
matrixst<=st4; when st4=> matrix_oe_n<='0';------enable output matrixst<=st5; when st5=> ----------small delay-------- if(delay<20)then delay<=delay+1; else delay<=0; matrixst<=st0; end if; when others=>NULL; end case; else matrix_clk<='0'; end if; end if; end process; [/vhdl]
-
Thread
Anweisung um Block-RAM zu vermeiden ??
Value_to_write is when "00000000" => my_HuffCode_to_write_ac_y <= "1010000000000000" ; when "00000001" => my_HuffCode_to_write_ac_y <= "0000000000000000" ; when "00000010" => my_HuffCode_to_write_ac_y <= "0100000000000000" ; when "00000011" => my_HuffCode_to_write_ac_y <= "1000000000000000" ; when "00000100" => my_HuffCode_to_write_ac_y <= "1011000000000000" ; when "00000101" => my_HuffCode_to_write_ac_y
-
Thread
FTDI Baudrate mit Spezial-Divisor berechnen
when i use baud rate = 3mb i see divisor is 0 !!!!!! not 1 what is the baud rate to make divisor be 1 :( thnx for ur help
@ Ramiz (Gast) >when i use baud rate = 3mb i see divisor is 0 !!!!!! not 1 How do you do this? Reagrds Falk
-
Thread
ISE 13.1 - VHDL 2008?
of std_logic_vector;[/vhdl] oder auch nett: case mit don't cares: [vhdl] case? sel is when "1---" => o <= "11"; when "-1--" => o <= "10"; when "--1-" => o <= "01"; when "---1" => o <= "00"; when others => null; end case; [/vhdl]
-
Thread
Funktionsblock mit einem Takt verzögert ansprechen
0000000000000000"; elsif(CLK'event and CLK = '1')then case S_REGZ is when "0000" => DATA(0)<= Q1; DATA(1)<= Q2; when "0001" => DATA(2)<= Q1; DATA(3)<= Q2; when "0010" => DATA(2)<= Q1; DATA(3)<= Q2; when "0011" => DATA(4)<= Q1; DATA(5)<= Q2; when "0100" => DATA(6)<= Q1; DATA(7)<= Q2; . . . when others => NULL; end case; end if; Q1 und Q2 sind die beiden Ausgänge vom
-
Thread
Final State Machine
if; when X"1" => if .... then state <= X".."; ... else state <= X".."; ... end
if; when others => NULL; end case; end if; end process; so beschreibe ich immer statemachines in vhdl (wobei ich nicht bei jedem-state ein if oder gar if-else statement habe. aber das ist ja die
-
Thread
Treiber für Leuchtdiodenzeile in VHDL
<= "000001111"; when "0101" => led_bar <= "000011111"; when "0110" => led_bar <= "000111111"; when "0111" => led_bar <= "001111111"; when "1000" => led_bar <= "011111111"; when "1001" => led_bar <= "111111111"; when others => led_bar <= "000000000"; end case; end process; [/vhdl] MfG Falk
-
Thread
Dezimale Zahl auf 7-Segment
OF dec_to_7SEG IS BEGIN PROCESS (sec_einer) BEGIN CASE sec_einer IS WHEN "0" => (DIG0_SEG0 <= "1" AND DIG0_SEG1 <= "1" AND DIG0_SEG2 <= "1" AND DIG0_SEG3 <= "1" AND DIG0_SEG4 <= "1" AND DIG0_SEG5 <= "1" AND DIG0_SEG6 <= "0" AND DIG0_SEG7 <= "0"); WHEN
looks_like OF dec_to_7SEG IS BEGIN PROCESS (sec_einer) BEGIN CASE sec_einer IS when "000000000" => "10101010101"; when "000000001" => "11111111111"; -- weitere Codierungen einfügen when others => "10101010101"; END CASE; END PROCESS; END looks_like
-
Thread
Temic-Datenblättern
and are in search of datasheets for them? Or do you have datasheets and want to share them with others?
datasheets and want to share them with others? Yes, I have other complete data sheets and want to share them with others. Thanks for your response.
-
Thread
freehdl, components, ambiguousness
= conv_std_logic_vector(255,8) ) then pwm_cnt <= ( others => '0' ); else pwm_cnt <= pwm_cnt + 1; end if; -- led1 for i in 0 to 9 loop if ( pwm_cnt8 < pattern1(i) ) then led1(i) <= '1'; else
= conv_std_logic_vector(255,8) ) then pwm_cnt <= ( others => '0' ); else -- pwm_cnt <= pwm_cnt + 1; end if; -- led1 for i in 0 to 9 loop -- if ( pwm_cnt8 < pattern1(i) ) -- then -- led1(i) <= '1'; -- else
-
Thread
Synthese scheitert. Anfänger fehler ?
shiftAle(1 downto 0) & ale; -- ale Signal shiften und auf shiftAle abbilden bus_out <= dout when (cpu_rd_n='0') else -- cpu_rd_n legt dout auf Bus (others => 'Z'); din <= bus_out when (cpu_wd_n='0') else -- cpu_wd_n legt Bus auf din (others => 'Z'); end BEHAVIORAL
-
Thread
FPGA Standards
hängen bleibt. Schlimmstenfalls, weil das heiße FF bei einer One-Hot-Kodierung umfällt. Und nein, "when others" hilft da gerade eben /nicht/... (*) Synthesewerkzeug-spezifische Attribute usw. nehme ich dabei jetzt aus.
Nase schrieb im Beitrag #4340332: > Und nein, "when others" hilft da gerade eben nicht... Gegen eine amoklaufende FSM hilft nicht mal eine "safe FSM". Siehe den https://www.mikrocontroller.net/topic/376674#4274057
-
Thread
Zählerabhängige Operationen im CPLD
Ausgang <= (others => '0') when (pixelzähler < 50) else RAMInhalt when (pixelzähler >=50) and (pixelzähler <690) else ...usw. das '0' in der others anweisung muss natürlich mit dem datentyp RAMInhalt übereinstimmen
-
Thread
Makrozellenverbrauch reduzieren
Grundlagenfrage: Als C-Programmierer würde ich sowas [vhdl] with index select anodBits <= "000001" when 0, "000010" when 1, "000100" when 2, "001000" when 3, "010000" when 4, "100000" when 5; [/vhdl] als Schieben einer Konstante schreiben
Gibt es so etwas auch in VHDL? Ja: [vhdl] process( index) begin anodBits <= ( others => '0'); anodBits( index) <= '1'; end process; [/vhdl] Duke
-
Thread
Wie kann ich ''ERROR:Xst:2108'' fixieren?
std_logic_vector(6 downto 0); begin process(clk,reset,PWM_in) begin if (reset = '1') then counter <= (others =>'0'); Totzeit_count <= (others =>'0'); elsif rising_edge(PWM_in) then Totzeit_count <= Totzeit; if rising_edge(clk) then counter <=counter + '1'; if falling_edge
else PWM_out <= PWM_in; end if; counter <=(others =>'0'); end if; end if; end if; end process; end Behavioral;'' und dann mache ich Synthesize-XST --> entsteht 2 Error: ERROR:Xst:2108 - Logic for signal <counter>
-
Thread
Untschied Bit_vector und Syntax?
bit); end; architecture demo of fktab is begin with bit_vector'(x4,x3,x2,x1) select y <='1' when"0001", '1' when"0010", '1' when"0100", '1' when"0111", '1' when"1000", '1' when"1011", '1' when"1101", '1' when"1110", '0' when others; end demo; was hat das apostroph nach dem bibtvector
-
Thread
Meine Hausaufgabe
data_ram <= Data_WR when (wr='1') else (others=>'Z'); -- hier wirds jetzt ohne weitere Info undurchsichtig: Data_RD <= data_ram; -- ???? ich gehe mal davon aus, dass das Instruction <= data_ram; --
auch ein paar Latches einfangen :-( -- Takt gibt es ja keinen :-o drdloc <= data_ram when RD='1' else drdloc; instloc <= data_ram when RD='0' and WR='0' else instloc; Data_RD <= drdloc; Instruction <= instloc; end Mem_Interface; [/vhdl] So ähnlich könnte
-
Thread
Content-Addressable-Memory in VHDL
downto 0; signal s1,s2,s3: std_logic; --logic functions begin case x_count is when 1 => s1 <= '1'; s2 <= '1'; s3 <= '0'; when 2 to 15 => s1 <= '1'; s2 <= '0'; s3 <= '1'; when 0 => s1 <= '0'; s2 <= '0'; s3 <= '0'; when others => null; end case; end behavior; [/vhdl] wie kann man das hier noch in mein Bespiel einpflanzen? :o)
-
Thread
fehlende Testbench Befehle
5000 [/pre] [vhdl] : constant time_unit : time := 1 us; : read(line, mark); case mark is when '#' => null; -- ignore comments when 'T' => read(line, space); read(line, time_value); wait for time_value * time_unit; : when others => null; end case; [/vhdl]
signal testbench_clock : std_logic := '0'; : testbench_clock <= not testbench_clock after period/2 when simulation_active; : process begin : -- apply some test vectors : simulation_active <= false; wait; end process; [/vhdl] Duke
-
Thread
Schleifen untile oder while
ein kleines Beispiel? process(clk) begin if rising_edge(clk) then case state is when warten => if taste='1' then state = Z1; end if; when z1 => state = Z2; when z2 => if code="111" then
else state <= Z1; end if; when others => state <= warten; end case; end if; end process; Das Beispiel ist zwar wenig sinnvoll, zeigt aber das Prinzip. >Die Tasten sind in dem programm schon entprellt worden. Welchem
-
Thread
Internen Oszillator aktivieren
<= '0'; ce <= '0'; error <= '1'; when "0100" => up_down <= '0'; ce <= '1'; error <= '0'; when "0101" => up_down <= '0'; ce <= '0'; error <= '0'; when "0110" => up_down <= '0'; ce <= '0'; error <= '1'; when "0111" => up_down
<= '0'; ce <= '0'; error <= '0'; when others => null; end case; end process; end Behavioral;[/vhdl]
-
Thread
Ampelschaltung
CNTPHASE <= TREDAMBER; when REDAMBER => STATE <= GREEN; CNTPHASE <= TGREEN; when GREEN => STATE <= AMBER;
DUTYPEDR <= "00000000"; end if; -- Pedestrian light OFF when others => DUTYMAINR <= "10000000"; DUTYMAING <= "00000000"; DUTYSIDER <= "10000000"; DUTYSIDEG <= "00000000";
-
Thread
Function Aufruf ergibt Fehler. Warum?
aufgerufen werden. [vhdl] begin ..... if (MASTER = x"00") then case WERT_TT is when TT_0 => WERT_R_16BIT_OUT <= (others => '0'); WERT_R_16BIT_OUT <= (others => '0'); when TT_1 => WERT_R_16BIT_OUT <= SCALING(WERT_R_16BIT_IN); WERT_R_16BIT_OUT <
-
Thread
Frequenzteiler
when "00011" => cnt_div <= 8-1; -- 3 | 10Mhz | 2µs when "00100" => cnt_div <= 20-1; -- 4 | 4Mhz | 5µs when "00101" => cnt_div <= 40-1; -- 5 | 2Mhz | 10µs
when "10101" => cnt_div <= 8000000-1; -- 21 | 10 hz | 2 s when "10110" => cnt_div <= 20000000-1; -- 22 | 4 hz | 5 s when others => end case; else if cnt = cnt_div
-
Thread
seriell-parallel Umsetzer mit EPM3032
begin -- der Zähler process (sclk,cs) begin if (cs = '0') then lpm_cnt <= (others=>'0'); elsif rising_edge(sclk) then if (cs='1') then lpm_cnt <= std_logic_vector(unsigned(lpm_cnt) + 1); end if; end if; end process; -- das
sdata; end if; end if; end process; -- ein Latch do <= "00000000" when cs = '0' else lpm_sr when lpm_cnt(2 downto 0) = "111" else do; -- ein wenig Kombinatorik nwe <= '1' when lpm_cnt(2 downto 0) = "111" else '0';
-
Thread
VHDL - Initialwerte/State machine
if rising_edge(CLKO) then LED_PWR_GOOD <= not LED_PWR_GOOD; case state is when init1 => LED_TEST_GOOD <= '0'; state <= test1; when test1 => LED_TEST_GOOD <= '1'; state <= init2; when init2 => LED_TEST_GOOD <= '0'; state <= test2; when test2 => LED_TEST_GOOD <= '1'; state <= init1; when others => state <= init1; end case; end if; end process; M0 <= not LED_PWR_GOOD;
-
Thread
Klausurvorbereitung Digitaltechnik (VHDL)
Altklausuren oft über einen Ausdruck gestolpert, den > ich nicht richtig zu interpretieren weiß: > > WHEN ("100" XOR "001") => w<='0'; Ist gleichbedeutend zu [vhdl] WHEN "101" => w <='0'; [/vhdl] > 2. VHDL selber schreiben in Bezug auf synchrone Schaltwerke: > Ich habe ein Zustandsdiagramm
ist - beides passt hier aber y wäre --dann y=100 [...] weiter unten das gleiche Spiel [...] WHEN OTHERS => y<="111"; --Bezug auf obige case Anweisung, noch im Process IF x(1) ='1' THEN IF x(0)='0 THEN z<=za; --also x=10 und y=111 ELSE z<=zb; y(1) <= '0'; END IF;
-
Thread
INFO:Xst:2117 wie "add an 'INIT' attribute" zu state?
'; next_state <= WAIT_ENABLE; case current_state is when WAIT_ENABLE => if READ_ENABLE = '1' then next_state <= WAIT_WINDOW_START; end if; when WAIT_WINDOW_START =>
next_state <= WAIT_ENABLE; when others => next_state <= WAIT_ENABLE; end case; end process; [/vhdl] In diesem Fred ging es ums gleiche Thema: http://www.mikrocontroller.net/topic/50173#new Demzufolge