-
Thread
Vivado Warnung, "Sequential element unused" warum tritt sie auf?
led_out(7) <= not disp_data(38); count_disp := 0; when others => an_out <= "11111111"; end case; end if; end if; end process; G1_Bcd_Dec: Bcd_Dec port map (hex,bcd); end Behavioral; [/vhdl] Er benutzt
<= "00100001"; --D --> "01011110" when "1110" => bcd <= "00000110"; --E --> "01111001" when "1111" => bcd <= "00001110"; --F --> "01110001" when others => bcd <= "00000000"; end case; end process; end Behavioral;
-
Thread
Unerklärlicher Type error mit std_logic_vector
--Selektor mit der der korrekte Wert für die LevelRegister übernommen wird 1 when (iRisingKeyEdge(0) = '1'), 2 when (iRisingKeyEdge(1) = '1'), 0 when others; SelektorLevelB : with iRisingKeyEdge select oSelLevelB <= 1 when (iRisingKeyEdge(2) = '1'), 2 when (iRisingKeyEdge(3) = '1'), 0 when others; end architecture Beh; [/vhdl] ist die Syntax vom with Select falsch oder darf man beim with kein array benutzen? Für Hilfe wäre ich sehr dankbar!
-
Thread
integer und case
case Konstrukt habe ich. Wenn ich in einem Prozess einen Mux bauen will, geht das ja u.A. mit case...when. Benutze ich als Auswahlkriterium einen unsigned Vektor funktioniert es. Ich habe nun probiert einen integer zu benutzen und dabei bin ich gescheitert. Wenn ich den integer durch unsigned(int, breite
end probe; architecture Behavioral of probe is (...) signal s_sel: unsigned(1 downto 0) := (others=>'0'); (...) mux: process begin (..) case s_sel is when "00" => when others => end case; s_sel <= s_sel + 1; if( to_integer(s_sel) >= STELLEN) then s_sel <= (others
-
Thread
Vergleichsalgorithmus gibt seltsames Ergebnis aus
signal eing_z3 : std_logic_vector (11 downto 0); ... if res = '1' then eing_z1 <= (others => '0'); eing_z2 <= (others => '0'); eing_z3 <= (others => '0'); elsif clk'event and clk = '1' then eing_z1 <= eing; eing_z2 <= eing_z1; eing_z3 <= eing_z2; .
die Gefahr geringer, dass Du Dir irgendwo Latche einfängst. Also z. B. TARGET <= VALUE_1 when CONDITION_1 else VALUE_2 when CONDITION_2 else . . . VALUE_n; Gruss Axel PS: Allerdings habe ich noch nicht verstanden, was Du eigentlich
-
Thread
MII Synchronisierung, Ethernet
process(rst, clk) begin if rst = '1' then rxstate <= idle; rx_buffer <= (others => '0'); elsif rising_edge(clk) and (rxclk_sync = '0') then rx_stb_o <= '0'; frame_start <= '0'; case rxstate is when idle => if rxdv = '1' then rxstate <= wa; rx_buffer <= (others => '0'); end if; when wa => rxstate <= data_lo; when data_lo => frame_start <= '1'; if rxdv = '0' then rxstate
-
Thread
SDRAM Timing. Geht das so? READ NOP NOP READ?
cmd_ready = '1' and stp_refresh = '1' and clkenable = '1' ) then case state is when ST_INIT => --..... when ST_WRITE => --..... when ST_READ => cmd_wr <= '0'; cmd_address <= addr_cnt; --x"0000A0"
else addr_cnt <= addr_cnt + '1'; end if; when others => null; end case; else cmd_enable <= '0'; end if; end if; end process test; [/vhdl] Dieses Bild zeigt nun das Timing direkt am IC gemessen mittels
-
Thread
SPI Master 1. Übertragung wird verschluckt
when 3 => TX_Start <= '1'; state <= 4; when 4 => if TX_Done = '1' then TX_Start <= '0'; state <= 5;
when 6 => TX_Data <= x"8" & ValueB & x"0"; -- 2. Byte mit ValueB state <= 7; when 7 => if delay_counter > 0 then
-
Thread
Shiften in VHDL.
[vhdl] case (CounterX) is when "000" => out <= "00000001"; when "001" => out <= "00000010"; when "010" => out <= "00000100"; when "011" => out <= "00001000"; when "100" => out <= "00010000"; when "101" => out <= "00100000"; when "110" => out <= "01000000"; when "111" => out <= "10000000"; when others => out <= "00000000"; end case
-
Thread
VHDL UART mehrere Vectoren empfangen und einordnen
end process; RX_Data <= rxsr; --RX_DATA müsste in den Vektor eingeordnet werden. RX_Busy <= '1' when (rxbitcnt<9) else '0';
Datenarray TYPE RX_Type is array (0 to 15) of STD_LOGIC_VECTOR(7 downto 0); Signal RX_Data : RX_Type (others => (others => '0'); und dann mit ner schleife halt das Array durchgehen, bis du alle Bytes empfangen hast. So in etwa würde ich das zumindest machen ;D
-
Thread
Zählermit Einstellmöglichkeiten
reset) begin --if reset = '1' then -- count_q <= (others => '0'); --elsif rising_edge(clk) then if rising_edge(clk) then if clr = '1' then count_q <= (others => '0'); elsif cnt_ena = '1' then count_q <= count;
counting : PROCESS (reset, clock) BEGIN IF(reset ='1') THEN count <= (others => '0'); cmp <= (others => '0'); tmp <= (others => '0'); tmp_pre<=(others => '0'); twostp<= (others => '0'); ELSIF(rising_edge
-
Thread
eigene Daten/Steuerregister erstellen
if (wr_n= '0') then case address is when x"00" => Reg_0x00 <= write_data; when x"01" => Reg_0x01 <= write_data; when x"02" => Reg_0x02 <= write_data; end case; end if; so oder so ähnlich
process(RegisterFile, reg_idx_i) is begin if (reg_idx_i = -1) then reg_o <= (others => 'X'); else reg_o <= RegisterFile(reg_idx_i); end if; end process RegisterFileRead; RegisterFileWrite : process (clk_i, res_i) is begin --Reset
-
Thread
SPLD (GAL) - welche Software
when "10" => digit <= s10; an <= "1011"; dp <= '1'; when others => digit <= m; an <= "0111"; dp <= '0';
digit=1 else "0100100" when digit=2 else "0110000" when digit=3 else "0011001" when digit=4 else "0010010" when digit=5 else "0000010" when digit=6 else
-
Thread
Alternative Zählerbeschreibung
ena <= '1'; else ena <= '0'; end if; end if; end process; sig <= cnt(12) when rising_edge(clk); end architecture; [/vhdl]
ena : std_logic := '0'; begin process(reset, clk) begin if reset = '1' then cnt <= (others => '0'); cnt2 <= (others => '0'); ena <= '1'; elsif rising_edge(clk) then if (ena = '1') then -- Splittung der Kombinatorik cnt <= cnt + 1; end if;
-
Thread
Division mit verschiedenen Werten
zahl1,zahl2,zahl3,i) variable tmp : integer range -256 to 255; begin case i is when 1 => tmp := (zahl1 + zahl2); when 2 => tmp := (zahl1 + zahl3); when others => tmp := (zahl2 + zahl3); -- Defaultzuweisung end case; result <= tmp/2; end process
combinational path delay: 16.236ns process (zahl1,zahl2,zahl3,i) begin case i is when 1 => result <= ((zahl1 + zahl2) / 2); when 2 => result <= ((zahl1 + zahl3) / 2); when others => result <= ((zahl2 + zahl3) / 2); -- Defaultzuweisung end case; end
-
Thread
NIOS II mit eigenem Bauteil verbinden
; when x"03" => digital_o_reg <= as_writedata; when others => null; end case; end if; -------------------------------------------------------------------------
as_read; if as_chipselect = '1' and as_read = '1' then case as_address is when x"00" => reg_readdata <= Input_register(31 downto 0); when x"01" => reg_readdata <= digital_i_reg; when x"02" => reg_readdata(15 downto 0) <= cBOARD_REVISION; when
-
Thread
StateMachine - aber Warnung Gated Clock
end if; end process; process (state) begin followingstate <= state; case state is when 1 => ... when 2 => ... ... when others => ... end case; end process; Vielleicht kann mir ja jemand weiterhelfen und sagen was ich falsch mache! Vielen Dank im Voraus Andi
= '1') then state <= "00000"; elsif (rising_edge(clk)) then case state is when "00000" => ... state <= "0001"; when "00001" => ... state <= ... when others => ... state <= ... end case;
-
Thread
State Machine mit warte-state
else RD_EN_A <= '0'; RD_EN_B <= '0'; PDATA <= (others => 'Z'); end if; -- WARTE when WARTE => if (PCS1 = '0' and POEn = '0' and PRnW = '1') then RD_EN_A <= '0'; RD_EN_B <= '
auch wirklich wartest. derzeit machst du eigentlich das selbe wie in LESEN... [vhdl] when WARTE => RD_EN_A <= '0'; RD_EN_B <= '0'; PDATA <= (others => 'Z'); if (PCS1 = '1') then -- deselektiert -> bereit für nächsten Lesezugriff
-
Thread
Defaults bei CASE-Anweisungen
trx_dma_ch3_ena <= '1'; when others => trx_dma_ch4_adr <= inp_dma_trx_adr; trx_dma_ch4_dat <= inp_dma_trx_dat; trx_dma_ch4_cnt <= trx_dma_ch4_cnt+1;
trx_dma_ch16_ena <= '0'; : case dma_channel_no is when "0000" => trx_dma_ch1_ena <= '1'; : when "0001" => trx_dma_ch2_ena <= '1'; : : : : : trx_dma_ch15_ena <= '1'; :
-
Thread
VHDL ALU ohne Libraries
10": And, "11": Or process (iALUControl,iSrcA, iSrcB) begin case iALUControl is when "00" => -- A + B addBV(iSrcA, iSrcB, Result); when "01" => -- A - B bzw. (A + (-B)) --subBV(iSrcA, iSrcB, Result); when "10" => -- A AND B Result <= iSrcA and iSrcB; when "11" => -- A OR B Result <= iSrcA or iSrcB; when others => Result <= (others => '0'); end case; end process; Output: process (Result) begin oALUResult
-
Thread
VGA Text Mode Problem
green <= "0000"; blue <= "0000"; case zeilenpuffer1(signCounter) is when 0 => if ascii_a(bm_pixelCounter, bm_lineCounter) = '1' then green <= "1111"; else green <= "0000"; end if; when 1 => green <= "0000"; when OTHERS => green <= "0000"; end case; else red <= "0000"; green <= "0000"; blue <= "0000"; end if; ------------------------------------------------ end if;
-
Thread
Altera CycloneI ATARI-FPGA
clk_register) then if (reset_n_in = '0') then pia_crb2 <= '0'; pia_ddrb <= (others => '0'); pia_portb <= (others => '0'); else if (rw = '0') then case adr is when x"D301" => if (pia_crb2 = '0') then
data_in; else pia_portb <= data_in; end if; when x"D303" => pia_crb2 <= data_in(2); when others => null; end case; end if; end if; end if; -- simulate pull-ups on inputs (ddrb is set to
-
Thread
Tesbench synthetisierbar machen
push2, push3); signal state : state_type := idle; signal counter : unsigned(8 downto 0) := (others => '0'); begin process begin wait until rising_edge(clk); case state is when idle => counter <= (others => '0'); if push(0) = '1' then state <= push0;
; end if; when push3 => counter <= counter + 1; cfg <= config4rom(to_integer(counter(8 downto 1))); cfgclk <= counter(0); if counter(8 downto 1) = 145 then state <=
-
Thread
Byte lesen und schreiben beim SRam DE1.lb und ub
Anbindung einer 8 Bit CPU an den 16 Bit SRAM auf dem DE1: [vhdl] RAM_D <= SRAM_DQ(7 downto 0) when A(0)='0' else SRAM_DQ(15 downto 8); SRAM_DQ(7 downto 0) <= CPU_DO when WR_n='0' and RAM_CS_n='0' else (others => 'Z'); SRAM_DQ(15 downto 8) <= CPU_DO when WR_n='0' and RAM_CS_n='0' else (others => 'Z'); SRAM_UB_N <= not A(0); SRAM_LB_N <= A(0); SRAM_ADDR(13 downto 0) <= A(14 downto 1); [/vhdl]
-
Thread
VGA signal wird vom bildschirm nicht erkannt
HCounter : process (clk25, reset) begin if reset = '1' then horizontal_counter <= (others => '0'); elsif clk25'event and clk25 = '1' then if EndOfLine = '1' then horizontal_counter <= (others => '0'); else horizontal_counter <= horizontal_counter + 1; end if; end if; end process HCounter; EndOfLine <= '1' when horizontal_counter = HTOTAL - 1 else '0'; VCounter: process (clk25, reset) begin if reset = '1' then vertical_counter <= (others => '0'); elsif clk25'event and clk25 = '1' then
-
Thread
enable, wie richtig?
a <= '0' & unsigned(x); -- b <= '0' & unsigned(y); -- c <= a + b; -- carry <= c(c'high) when enable = '1' else '-'; -- z <= std_logic_vector(c(n-1 downto 0)) when enable = '1' else (others => '-'); end Behavioral; [/vhdl]
if enable = '1' then c <= '0' & unsigned(x) + '0' & unsigned(y); else c <= (others=>'0'); end if; end process; : [/vhdl] Das gibt zum guten Ende dann "nur" Kombinatorik. Und sowas >> carry <= c(c'high) when enable = '1' else '-'; '-', 'h', 'l', 'x'... kann die
-
Thread
Zwei Clockdomains, ein Signal.
,GREEN,BLUE,MUL_VAL); ENABLE<=MUL_VAL; IF(BT656_VIDEN='1')THEN CASE STATE IS WHEN GETCB=> MUL_EN<='0'; CB<=BT656_DATA; STATE<=GETY; STATE_FLAG<='1'; WHEN GETCR=> MUL_EN<='0'; STATE<=GETY; CR<=BT656
,GREEN,BLUE,MUL_VAL); ENABLE<=MUL_VAL; IF(BT656_VIDEN='1')THEN CASE STATE IS WHEN GETCB=> MUL_EN<='0'; CB<=BT656_DATA; STATE<=GETY; STATE_FLAG<='1'; WHEN GETCR=> MUL_EN<='0'; STATE<=GETY; CR<=BT656
-
Thread
Atmega SPI-Slave bleibt bekommt kein SPIF Signal und bleibt hängen
spi_init() // Initialize pins for spi communication { /* Set MOSI SCK and SS output, all others input */ DDR_SPI = (1 << DD_MISO); DDR_SPI &= ~((1 << DD_MOSI) | (1 << DD_SCK) | (1 << DD_SS)); /* Enable SP */ SPCR = ((1<<SPE)| // SPI Enable (1<<SPIE
// SPI Clock Rate FOSC/64 (0<<CPOL)| // Clock Polarity (0:SCK low / 1:SCK hi when idle) (0<<CPHA)); // Clock Phase (0:leading / 1:trailing edge sampling) SPSR = (1<<SPIF); // initialize }[/code] Ist bei der Initialisierung etwas verkehrt? Wäre suppi
-
Thread
Probleme bei Lattice I2C EFB mit Wishbone Interface
RESET = '1' then -- reset core WB_ADRESS <= x"4F"; WB_DATA_IN <= (others => '0'); WB_WRITE_EN <= '0'; WB_CYCLE <= '0'; WB_STROBE <= '0'; STATE <= START; else case STATE is when POR => WB_WRITE_EN <
0'; WB_CYCLE <= '0'; WB_STROBE <= '0'; end if; when others => STATE <= STOP; end case; end if; end if; end process WB_to_I2C_FSM; [/vhdl]
-
Thread
conv_integer bei einem 8-bit Multiplexer
y_int := conv_integer(a(4)); when "101" => y_int := conv_integer(a(5)); when "110" => y_int := conv_integer(a(6)); when "111" => y_int := conv_integer(a(7)); when others => null; end case; y <= y_int; end
y <= a(to_integer(unsigned(sel)); [/vhdl] BTW: [vhdl] when others => null; [/vhdl] Das gibt in der Simulation ein Latch. In der Hardware ist es zum Glück egal, denn da gibt es nur '0' und '1' in einer Abfrage... BTW2: wozu der unnötige Umweg über y_int
-
Thread
VHDL Zahlen addieren und auf 7Seg ausgeben
"1111101" when 6, -- 6 "0000111" when 7, -- 7 "1111111" when 8, -- 8 "1101111" when 9, -- 9 "1000000" when 10, -- KP+ "0110111" when 11, -- Enter "0111001" when 12, -- C "1111001" when 13, -- E "0000001" when others; --X -- PS2 Keyboard Scanner C1 : PS2_reader port map (mclk=>mclk, PS2C=>PS2C, PS2D=>PS2D, rst=>rst, Ps2Dout
-
Thread
effizienter/kleiner, konfigurierbarer Frequenzteiler
p_divide_sys_clk : PROCESS (NRES, CLK) BEGIN IF NRES = '0' THEN sys_clk_cnt <= (OTHERS => '0'); sys_clk_divide <= '0'; ELSIF rising_edge(CLK) THEN sys_clk_cnt <= sys_clk_cnt + 1; CASE FREQ_DIVIDE IS WHEN "11" => sys_clk_divide <= sys_clk_cnt(3); -- divide by 16 WHEN "10" => sys_clk_divide <= sys_clk_cnt(2); -- divide by 8 WHEN "01" => sys_clk_divide <= sys_clk_cnt(1); -- divide by 4 WHEN OTHERS => sys_clk_divide <= sys_clk_cnt(0); -- divide
-
Thread
Parallel to SPI Interface-Chip?
THEN --reset system busy <= '1'; --set busy signal ss_n <= (OTHERS => '1'); --deassert all slave select lines mosi <= 'Z'; --set master out to high impedance rx_data <= (OTHERS => '0'); --clear receive data port state <= ready; --go to ready state when reset is exited ELSIF(clock'EVENT AND clock = '1') THEN CASE state IS --state machine WHEN ready => busy <= '0'; --clock out not busy signal
-
Thread
PIO implementieren: in + out oder inout?
: [vhdl] bidir <= a when oen='0' else (others->'Z'); b <= bidir; [/vhdl]
Lothar M. schrieb im Beitrag #6325547: > bidir <= a when oen='0' else (others->'Z'); > b <= bidir; Ja, das mache ich auch genau so. Nur letztens bin ich damit bei Lattice Diamond reingefallen: Ich brauchte den Input nicht und prompt machte der
-
Thread
Simualtion nach bestimmter Bedingung beenden
Signal auf 0 gesetzt aber die Simulation wird weiter fortgeführt else case n is when "00000010" => x <= x"0000"; when others => x <= signal(6 downto 0); end case; end if; [/vhdl] Ich bin offen für jede Anregung.Danke.
= "00000011") report "n ist größer als 3" severity failure; case n is when "00000010" => x <= x"0000"; when others => x <= signal(6 downto 0); end case; [/vhdl] Allerdings hätte ich da noch eine Frage: Was ist dein /eigentliches/ Problem?
-
Thread
Vergleich: unsigned mit Konstante
Du musst len mit einem Vektor vergleichen: [vhdl] control_done <= (len = (others => '0')); [/vhdl]
: control_done <= '1' when len = (len'range => '0') else '0';
-
Thread
Fehlermeldung: ERROR - BN126 : is missing a driver.
den anderen Fällen bis auf die Anzahl der Loops. Es funktioniert auch nicht, wenn ich "111" durch "others" ersetze, oder "when others => irgendein default wert" hinter den Block packe. Könnte mir jemand vllt einen Tipp geben? Ich frage mich auch warum output_clk_c einen Fehler verursacht. Dieses Signal
signal sr : std_logic_vector (3 downto 0) := "1111"; begin sr <= not sr(0) & sr(3 downto 1) when rising_edge(input_clk); clk_out <= sr(3) when phase_shift="001" or phase_shift="011" else sr(2) when phase_shift="011" else sr(1) when phase_shift="101" or phase_shift
-
Thread
Width mismatch detected on comparator
Bestandteile wieder. Also zuerst definiere ich: [vhdl] signal pixel_counter : unsigned(11 downto 0) := (others => '0'); constant TEST_INT_CONST : integer := 10; signal test_int : integer := 0; [/vhdl] Dann habe ich: [vhdl] test_int <= 0 when (bedingung = '1') else TEST_INT_CONST; [/vhdl
rising_edge(clk) then ... if (pixel_counter > test_int) then data_out <= (others => '1'); else data_out <= (others => '0'); end if; ... [/vhdl]
-
Thread
Frequenzteiler 1:1000
IF (reset = '0') THEN -- asynchroner Reset counter <= (others => '0'); clk_1ms <= '0'; ELSIF (rising_edge(clk_1us)) THEN IF (counter < "1111100111") THEN -- hochzählen bis 999
; else count <= count +1; endif; endif; count_exp <= '1' when count = count_END else '0';
-
Thread
Bussystem in VHDL
mir viel zu kompliziert, letztendlich ist das or_reduce() ja nichts anderes als ein Vergleich mit (others => '0): [vhdl] function or_reduce(V : std_logic_vector) return std_ulogic is constant cmp : std_logic_vector(V'range) := (others => '0'); begin if cmp = V then return '0';
erschlagen, der sehr Pflegeleicht ist. [vhdl] ---BUS multiplexer BBUS_out <= slave(0) when BSEL(0)='1' else --DRAM slave(1) when BSEL(2)='1' else --UART slave(2); --Bus Dummy [/vhdl] Für die Selektleitungen nutze ich die Adressbereiche und habe hier ein hex
-
Thread
Addition von std_logic_vector?
Behavioral of addSubUnit is begin With ctrl select data_out <= data1_in + data2_i) when 0, data1_in - data2_in when others; end Behavioral; [/vhdl] Die Fehlermeldung lautet: "+ can not have such operands in this context." und "- can not have such operands in this context."
multiplexer is signal temp_sel, temp_nE : std_logic_vector(inputs_A'length); begin temp_SEL <= (others => SEL); temp_nE <= (others => nE); --unbedingte Signalzuweisung für Multiplexer C_out <= (inputs_A AND NOT(TEMP_SEL)) OR (inputs_B AND temp_SEL) or temp_nE; end Behavioral; [/code]
-
Thread
FIFO läuft über
GREEN<=RAM2OUT2; BLUE<=RAM2OUT2; ELSIF( RAM2EMPTY='1')THEN RED<=(others=>'1'); BLUE<=(others=>'0'); GREEN<=(OTHERS=>'0'); END IF; [/vhdl] Und außerhalb des Prozesses steht einfach: RAM2FULL<='1' WHEN RAM2ADDR2=RAM2FULL_POINTER ELSE '0'; RAM2EMPTY<='1' WHEN RAM2ADDR1=RAM2ADDR2 ELSE '0';
-
Thread
Drehrichtungserkennung
"; -- Nur achte Led an when others => Led <= "00000000"; -- Alle Led's aus end case; else -- Balken-Betrieb case qint is when "0000" => Led <= "00000001"; -- Erste Led an when "0001" => Led <= "00000011
Led an when "0110" => Led <= "01111111"; -- Siebte Led an when "0111" => Led <= "11111111"; -- Achte Led an when others => Led <= "00000000"; -- Alle Led's aus end case; end if; end process;
-
Thread
clk'event bei beiden Taktflanken
einfach mit Multiplexern. Das ist ja DDR und hab zig mal gemacht, und es funktioniert Data_In <= DQ when (clk='1') else (others=>'Z'); ADDR <= Addresse when (clk='0') else (others =>'Z'); also clk als Steuereingang des Multiplexers. Verstehe jetzt Dein Problem nicht ;-) Kest
-
Thread
RAM basierter Bubble Sort in VHDL
(5 downto 0) := (others => '0'); signal addrb_d3 : std_logic_vector(5 downto 0) := (others => '0'); signal addrb_d4 : std_logic_vector(5 downto 0) := (others => '0'); signal dout_a : std_logic_vector
addrb <= addra + 1; end if; i <= i+1; -- addra else i <= (others => '0'); n <= n + 1; end if; else busy <= '0'; --do <= din; end if; end if; end if; end process; done <= '1' when start
-
Thread
Über Conditions loopen (VHDL)
> ausgang <= eingang0 when N = 0 else > eingang1 when N = 1 else > eingang2 when N = 2 else > ... > eingangNmax when N = Nmax; Der Trick und das Problem ist aber vermutlich
also z.B.: [vhdl] ... constant AND_COMPARE : std_logic_vector (GENERIC_WIDTH-1 downto 0) := (others => '1'); ... ... trg <= '1' when a /= AND_COMPARE else '0'; ... [/vhdl] Erspart einem das ganze Package-Gedoens und ist auch unabhaengig davon, was fuer Tools/Plattformen ich benutzen will
-
Thread
Wie unterschiedliche Clock-Domains verwenden?
CurrentState <= State_Reset; else case CurrentState is when State_Reset => FIFO <= (others => '0'); --TransmitterValid <= '0'; CurrentState <= State_WaitForTransmitterReady; when State_WaitForTransmitterReady => --TransmitterValid <= '0'; --if(TransmitterReady = '1') then CurrentState <= WaitForValid
-
Thread
std_logic Rotation
std_logic_vector (23 downto 0) := x"000001"; begin mastersr <= mastersr(22 downto 0) & mastersr(23) when rising_edge(clk); process variable einser : integer range 0 to 24; variable sr : std_logic_vector (23 downto 0); begin wait until rising_edge(clk); sr := (others=>'0');
Eingangswert jetzt auf 23 Bit gekürzt... [vhdl] mastersr <= mastersr (21 downto 0) & mastersr (22) when rising_edge(CLK); rotation1 : process (CLK) variable einser : integer range 0 to 23; variable sr : std_logic_vector (22 downto 0); begin if rising_edge(CLK) then sr := (others =>
-
Thread
PCI/ISA -Bus?
"0111", -- 7 "1111111" when "1000", -- 8 "1101111" when "1001", -- 9 "1110111" when "1010", -- A "1111100" when "1011", -- B "0111001" when "1100", -- C "1011110" when "1101", -- D "1111001" when "1110", -- E "1110001" when "1111", -- F "0111111" when others; -- 0 end Behavioral;
-
Thread
VHDL Anfänger braucht Hilfe bei der Überprüfung IF-THEN-ELSE
0110", -- '1' when "1100", '1' when "1101", '1' when "1111", '1' when "1110", -- '1' when "1000", '1' when "1001", '1' when "1011", '1' when "1010", 'X' when others; end verhalten; [/vhdl] > jedoch kann ich bei meinem > laienhaften Wissen nicht überprüfen, ob mein Gedankengang richtig ist. Dann installier dir schnellstens eine VHDL-Umgebung
-
Thread
Funktionsabbildung mit Altera Integer Arithmethic Megafunctions
state is when S_start => state_nxt <= S_calc; when S_calc => calc='1'; if counter > 50 then --nach spätestens 50 takten sollte die berechnung fertig sein state_nxt <= S_done; end if; when S_done => done <= '1'; --idle end case; end process; END rtl; [/vhdl]