fertig Videodaten ausschieben -- Idee INVERS Modus 10H/11H evl gleich hier mit rein Zei_INV <= '1' when D35_36 = x"11" -- InversModus ein else '0' when D35_36 = x"10" or QD41_42 = 69 ; -- InversModus aus -- INVERS-Auswertung BWS_Inv <= IO11_Latch when Zei_INV ='0' -- Umschaltung INVERS else not IO11_Latch
is when "00" => null; -- wait when "01" => case wave_form is --- wellenform berechnen -- saw when "00" => wave_out <= osc_count (15 downto 8); -- sqr when "01" => if osc_count (15) = '1' then wave_out <= (others
counter, overflow = 1s if cnt = to_unsigned(CNT_OFL, cnt'length) or main_state = idle then cnt <= (others => '0'); else cnt <= cnt + 1; end if; -- Sekunden timer if main_state = idle then -- reset timer time_s <= (others => '0'); elsif cnt = CNT_OFL then time_s <= time_s + 1; end if; case main_state is when idle => -- warte auf opt_sens hi ERGÄNZE when ……. => ERGÄNZE when ……. => ERGÄNZE when ……. => ERGÄNZE when ……. => ERGÄNZE when ……. => ERGÄNZE
clock_quicksort) variable temp : data_type_ram; begin if rising_edge (clock_quicksort) then case state is when init_state => read_address_quicksort_internal <= (others => '0'); write_address_quicksort_internal <= (others => '0'); state <= idle_state; when idle_state => if write_enable_quicksort = '1' then state
when 9 => SEG_10 <= "11001110"; TEMP <= TEMP - 90; when others => SEG_10 <= "00000000"; end case; case TEMP is -- 1er Stelle when 0 => SEG_1 <= "01111110"; when 1 => SEG_1 <= "00001100"; when 2 => SEG_1
waitCounter : integer range 0 to 50000000 := 50000000; signal signala : std_logic_vector(7 downto 0) := (others => '0'); signal signalb : integer range 0 to 256 := 0; begin process begin wait until rising_edge(clock); case state is when idle => signala <= (others => '0'); signalb <= 1; leds <= (others => '0'); if (btn = '0') then state <= run; end if; when run => if (signalb < 8) then signala <= std_logic_vector(to_unsigned(signalb
when you get an issue with you website. dont' be worry about it just contact see our site which [https://globalcool.org/how-to-create-a-wordpress-website/] wordpress websiteprovide the solution related to
When you get some Kind of wirres Zeug, then put this into the Eimer and put the Deckel druff.
when "1111" => up_down <= '0'; ce <= '0'; error <= '0'; -- keine Bewegung when others => null; end case; end process; -- Counter process (ce, RESET) -- reagiert auf CLK und RESET begin if (RESET = '1') then -- bei RESET t_cnt <= (others => '1'); -- clear (others => '0') setzt alle Ausgaben auf '0' t_cnt(23) <= '0'; -- t_cnt2 <= (others => '0'); -- clear (others => '0') setzt alle Ausgaben auf '0' elsif (rising_edge(ce)) then -- bei
? SioTXState <= IDLE; -- j: fertig end if; when others => SioTXState <= IDLE; end case; end if; end process; TX <= TX_Register(0); ReceiveSM: process (RESET, CLK) begin if (RESET='1') then SioRXState <= IDLE; RX_Register <= (others=>'1'); elsif (rising_edge(CLK)) then RX_DataReady <= '0'; case SioRXState is when IDLE => RX_Counter <= BIT_Reload/2; RX_Register <= (others=>'1'); if (RX_Entprellt = '0') then -- Startbit erkannt SioRXState <= RECEIVE; end if; when RECEIVE => RX_Counter <= RX_Counter - 1; if (RX_Counter
aller Werte -- --------------------------------------------------------------- when reset_state => tra_state<= ramReadH; zeilen_reg <= "00000001"; ramRD <='0'; modulcounter<=0; ramADR<= (others
-- ModulInc -- --------------------------------------------------------------- when modulinc_state => null; when others => null; end case; end if; end process; PIN_RAMADR <= ramADR; PIN_RAMRD <= ramRD; PIN_ZeilenCLKOUT
then clk <= '0'; counter <= (others =>'0'); end if; end process; ...... Nun habe ich bereits diverse Möglichkeite nausprobiert andere Periodendauern einstellen zu können: - den Counter nicht mit Konstanten vergleichen, sondern
<= counter+1; end if; end if; end process; clkout <= counter(0) when sel = "11" -- 2Hz else counter(1) when sel = "10" -- 1Hz else counter(2) when sel = "01" -- 1/2Hz else '0'; -- Ausgeschaltet [/vhdl] > Beide Möglichkeiten
<= Tasteneingabe; end if; when others => LED(3) <= '1'; end case; end if; end process; end architecture;[/vhdl]
gedrückter Taste ständig zwischen den Zuständen hin- und herspringt. Noch ein Wort zum überflüssigen "when others", das dir der Synthesizer sicher als "nicht erreichbar" vor den Latz knallt: http://www.lothar-miller.de/s9y/categories/25-when-others Duke Scarring schrieb im Beitrag #6242973: > Bitte
(srlen downto 0) := (others=>'0'); : sr <= sr(srlen -1 downto 0) & ser_in when rising_edge(clk); ser_out <= sr(srlen ); [/vhdl] Oder generisch mit Attributen, dann wird die Registerlänge über eine Änderung der Zahl
eingestellt (das gefällt mir am besten): [vhdl] signal sr : std_logic_vector (999 downto 0) := (others=>'0'); : sr <= sr(sr'left-1 downto 0) & ser_in when rising_edge(clk); ser_out <= sr(sr'left); [/vhdl] Oder, oder, oder...
if-else-konstrukten jede einzelne auf wahrheit überprüft wird ... bei case wird nur das zutreffende when ausgeführt! schade ... trotzdem danke für die antwort
es noch mehr solcher weisheiten gibt :) Ja, da wäre z.B. die unnötige generelle Verwendung von /when others/ : http://www.lothar-miller.de/s9y/archives/30-when-others.html Dann das "Gespenst der Metastabilität" (Zitat frei nach Peter Alfke): http://www.lothar-miller.de/s9y/archives/62-Testaufbau-Metastabilitaet.html
würde nicht gehen. Vll hab jemand von Euch ja noch eine Lösung case DATA_IN_SIG is when (MAX_SIG < DATA_IN_SIG) => MAX_SIG <= DATA_IN_SIG; MAX_VAL <= DATA_IN; when (MIN_SIG > DATA_IN_SIG) => MIN_SIG <= DATA_IN_SIG; MIN_VAL <= DATA_IN; when others => UR_VAL
MIN_VAL <= DATA_IN; -- -- when others => -- CUR_VAL <= DATA_IN; -- -- end case; end process; end Behavioral; den case hab ich ma auskommentiert. Die IF abfrage funzt
INSTHEADER: std_logic_vector(15 downto 0):=x"602C"; signal SENDREG: std_logic_vector(0 to 16+8*6*4-1):=(others => '0'); signal counter: unsigned(10 downto 0):=(others => '0'); signal waitcounter: unsigned(19 downto 0):=(others => '0'); signal adr: integer range 0 to 207:=0; begin nRESET <= '1'; nSYNC
end process; adr <= to_integer(counter(10 downto 3)); SDIO <= SENDREG(adr); SCLK <= counter(2) when counter < 1663 else '1'; nCS <= '0' when s_control = s_send_conf else '1'; end Behavioral;[/vhdl] clk: in std_logic; that is a 100 MHz Clock in the FPGA start: in std_logic; is a start signal
bit data input WRITE => '0' -- 0=write 1=read ); ComCode_process: process (Vsel) begin case Vsel is when "111" => ComCode <= X"0B"; -- Fast Read when "101" => ComCode <= X"03"; -- Read when "110" => ComCode <= X"E8"; -- Read Array when others => ComCode <= X"E8"; -- Read Array end case; end process; p_fsm
Expansion port ------------------------------------------------------------------------------- CAR <= A when CS4 = '1' else (others=>'Z'); NCRD <= NOE when CS4 = '1' else 'Z'; NCWR <= NWE when CS4 = '1' else 'Z'; CDR <= D when ((CS4 = '1') and (NWE = '0')) else (others=>'Z'); D <= do_reg when ((P26 = '0') and (NOE = '0')) else CDR when ((CS4 = '1') and (NOE = '0')) else (others=>'Z'); ------------------------------------------------------------------------------- --- Handle NPL External Enable Register ----------------------------
Expansion port ------------------------------------------------------------------------------- CAR <= A when CS4 = '1' else (others=>'Z'); NCRD <= NOE when CS4 = '1' else 'Z'; NCWR <= NWE when CS4 = '1' else 'Z'; CDR <= D when ((CS4 = '1') and (NWE = '0')) else (others=>'Z'); D <= do_reg when ((P26 = '0') and (NOE = '0')) else CDR when ((CS4 = '1') and (NOE = '0')) else (others=>'Z'); ------------------------------------------------------------------------------- --- Handle NPL External Enable Register ----------------------------
nicht mehr nötig, weil die FSM ja schon aus dem Idle heraus das Startbit ausgeben kann. Und das "when others" kann ich weglassen, wenn sowieso alle Zustände der FSM auscodiert sind: http://www.lothar-miller.de/s9y/categories/25-when-others BTW: es ist nicht verboten, sich den Quellcode von anderen
schon aus dem Idle heraus das Startbit > ausgeben kann. Stimmt, so ist es kompakter. > Und das "when others" kann ich weglassen, wenn sowieso alle Zustände der > FSM auscodiert sind: Hm, das habe ich jetzt sogar als "Information" des Synthesizers entdeckt. :)
clk); state <= next_state; end process; Averaging : process (state, v_in_new) begin case state is when reset => counter <= (others => '0'); summe_u <= (others => '0'); next_state <= idle; when idle => v_out_new <= '0'; --nothing to do, just stay and wait when inc => counter <= counter + 1; next_state <= add; when add => summe_u <= summe_u + unsigned(v_in); if(counter = 3) then counter <= (others => '0'); next_state <= mean; else next_state <= idle; end if; when mean => v_out <= std_logic_vector(summe_u(13 downto
habe hier diese anweisung: [vhdl] with ram_sw select add_b <= std_logic_vector(wr_adr_b) when '1' , std_logic_vector(rd_adr_b) when '0', 'xxxxx' when others; [/vhdl] leider kann ich hier ja keinen unbestimmten wert einem std_logic_vector zuweisen. wenn ich es weglasse ist es ja nicht falsch
simulation tut dann nicht. wenn ich z.b. ein std_logic typ habe dann kann ich da einfach ein < ...,'x' when others > dahinter setzen, nur wie mache ich das bei vector types? mfg Andi
- when "1010" => led <= x"cf"; -- --XX---- when "1011" => led <= x"9f"; -- -XX----- when others => led <= x"ff"; -- -------- end case; end if; -- S1 Schleife -- Taster abfragen if (key(1)='1') then led <=
std_logic_vector (3 downto 0); begin process(CLK, RES) begin if RES = '1' then QINT <= (others => '0'); elsif CLK'event and CLK = '1' then case QINT is when "0000" => QINT <= "0011" ; when "0011" => QINT <= "0101" ; when "0101" => QINT <= "0110" ; -- when "...." => QINT <= "...." ; when others => QINT <= "0000"; --when others => null; end case; end if; end process; Q <= QINT; end verhalten; [/VHDL] MfG Holger
data change end if; end process; -- states process (w_state_reg,i_tick) begin case w_state_reg is when idle => -- when regular state is "idle" o_done <= '0'; w_index_next <= (others => '0'); if(i_tick ='1') then w_state_next <= start; end if; when start => -- when regular state is "start" o_busy <= '1'; w_data_next <= (others => 'Z'); if(g_o_wordwith <= g_i_wordwith) then w_state_next <= short; else w_state_next <= long; end if; when short => -- when regular state is "short" if i_tick = '0' then w_data_next( ((g_o_wordwith
Mikrocontrollers (übrigens ich verwende den AtMega16) steht folgendes: • Bit 7 – SPIF: SPI Interrupt Flag When a serial transfer is complete, the SPIF Flag is set. An interrupt is generated if SPIE in SPCR is set and global interrupts are enabled. If SS is an input and is driven low when the SPI is in Master mode, this will also set the SPIF Flag. SPIF is cleared by hardware when executing the corresponding interrupt handling vector. Alternatively, the SPIF bit is cleared by first reading the SPI Status Register with SPIF set, then accessing the SPI Data Register (SPDR).
zeigt er die richtigen Werte für den Vektor E an, jedoch sind die des Ausgangsvektors die Werte der when others (< when others => A <= x"E"; >) Zuweisung. Für einen Tipp wäre ich sehr Dankbar... Grüße dominic
es keinen der werte, die in der state machine abgefragt werden. deswegen springt sie immer in den OTHERS-Zweig. bei in die entity mal dein eingang mit ein und verbinde alles, dann könnte vielleicht auch was passieren. ;)
) is begin if Bus2IP_Clk'event and Bus2IP_Clk = '1' then if Bus2IP_Reset = '1' then slv_reg0 <= (others => '0'); slv_reg1 <= (others => '0'); slv_reg2 <= (others => '0'); else case slv_reg_write_sel is when "100" => for byte_index in 0 to (C_SLV_DWIDTH/8)-1 loop if ( Bus2IP_BE(byte_index) = '1' ) then
NEXTSTATE <= RESET_ADR; end if; when RESET_ADR => NEXTSTATE <= IDLE; when others => NEXTSTATE <= IDLE; end case; end process; --clock-ausgang für den ad-wandler: invertiert, da bei steigender taktflanke ein neuer --wert ausgegeben wird
cpuClk'event AND cpuClk = '1' THEN IF cpuRst = '1' THEN intMemEn <= '0'; intMemWe <= '0'; adReg <= (OTHERS => '0'); intMemDataOut <= (OTHERS => '0'); state <= STPutW0; ELSE CASE state IS WHEN STPutW0 => adReg <= o"0014"; intMemDataOut <= o"1111"; intMemEn <= '1'; intMemWe <= '1'; state <= STPutW1; WHEN
longer important. The limiting factor is the internal RAM size. Some modes need more RAM space as others. So you can choose for some modes 32Kbyte buffer size. 김사백 schrieb im Beitrag #3863563: > So when it using 1000s/div in USTB how much is the maximum time it is > possible to browse the memorized
with some ranges of time base. Then, being dreaming I would suggest some things already asked by others in the past: 1) Maybe simple to do, put a warning on the screen in order to signaling when persistence is on. 2) Maybe hard to do, allow for uncalibrated VOLTS/DIV knob in order to fine scale
process serial data counter process (cs, o_clock, scounter) begin if (cs = '0') then acounter <= (others=>'0'); nWE <= '1'; elsif rising_edge(o_clock) then case scounter is when "000000" => -- 0 aconv <= '1'; when "000010" => -- 2 aconv <= '0'; when "011111" => -- 31 acounter <= std_logic_vector(unsigned
:= delay_counter0 + 1; end if; when others => end case; end if; end process; [/vhdl] Ich habe noch nicht ganz begriffen, wie genau die SPI-Schnittstelle des MCP3008 arbeitet, insbesondere, weil es anscheinend einen
else delay_counter0 := delay_counter0 + 1; end if; when others => end case; end if; end process; [/vhdl]
Defaultzuweisung vor dem case. Das machte bei mir bisher keine Probleme. Ich vermisse aber in deiner SM ein "when others". Außerdem wird in deinem Reset kein Reset-State definiert.. was aber eigentlich egal ist (irgendeiner wirds schon sein). Probieren kannst du auch noch das Encoding der SM einzustellen bei
hatte die Statemachine nur so grob skizziert, um die Frage zu erklären. Natürlich hat meine noch ein "when others" und ein reset-state gibt es auch. Ich habe auch mittlerweile den Fehler gefunden: Die Fifo Statemachines sind ok. Was den Fehler macht ist die Statemachine, die die Daten vom Fifo liest und
) is begin if Bus2IP_Clk'event and Bus2IP_Clk = '1' then if Bus2IP_Reset = '1' then slv_reg0 <= (others => '0'); slv_reg1 <= (others => '0'); --slv_reg2 <= (others => '0'); else case slv_reg_write_sel is when "100" => for byte_index in 0 to (C_SLV_DWIDTH/8)-1 loop if ( Bus2IP_BE(byte_index) = '1' ) then
) is begin if Bus2IP_Clk'event and Bus2IP_Clk = '1' then if Bus2IP_Reset = '1' then slv_reg0 <= (others => '0'); slv_reg1 <= (others => '0'); slv_reg2 <= (others => '0'); else case slv_reg_write_sel is when "100" => for byte_index in 0 to (C_SLV_DWIDTH/8)-1 loop if ( Bus2IP_BE(byte_index) = '1' ) then
) is begin if Bus2IP_Clk'event and Bus2IP_Clk = '1' then if Bus2IP_Reset = '1' then slv_reg0 <= (others => '0'); slv_reg1 <= (others => '0'); slv_reg2 <= (others => '0'); else case slv_reg_write_sel is when "100" => for byte_index in 0 to (C_SLV_DWIDTH/8)-1 loop if ( Bus2IP_BE(byte_index) = '1' ) then
) is begin if Bus2IP_Clk'event and Bus2IP_Clk = '1' then if Bus2IP_Reset = '1' then slv_reg0 <= (others => '0'); slv_reg1 <= (others => '0'); slv_reg2 <= (others => '0'); else case slv_reg_write_sel is when "100" => for byte_index in 0 to (C_SLV_DWIDTH/8)-1 loop if ( Bus2IP_BE(byte_index) = '1' ) then