-
Thread
counter vhdl
IST 30 MHZ ICH HABE SO GEMACHT ABER KLAPPT NICHT .. ... necsr <= necsr(1 downto 0) & nec when rising_edge(clk); bits <= bits (31 downto 0)& necsig when rising_edge(nec) if (necsr(2 downto 1)= "01") then -- start bit fuer zâhler cnt <= 0; -- bei jeder steigende flanke
aktuellen necsig. bsp: [vhdl] process (clk) begin necsr <= necsr(1 downto 0) & nec when rising_edge(clk); if (necsr(2 downto 1)= "01") then -- start bit fuer zâhler cnt <= 0; -- bei jeder steigende flanke zähler auf null gesetzt bits <= bits (31 downto 0)& necsig ; ELSE
-
Thread
Drehzahlmessung mit Encoderscheibe
wait until rising_edge(clk); cu := '0'; -- lokale Werte cd := '0'; case z is when Z00 => if (e = "01") then z <= Z01; cu := '1'; elsif (e = "10") then z <= Z10; cd := '1'; end if; when Z01 => if (e = "11") then z <= Z11; cu := '1
; elsif (e = "00") then z <= Z00; cd := '1'; end if; when Z11 => if (e = "10") then z <= Z10; cu := '1'; elsif (e = "01") then z <= Z01; cd := '1'; end if; when Z10 => if (e = "00") then z <= Z00; cu := '1
-
Thread
Unsigned und Vergleichsoperator
Du meinst wahrscheinlich numeric_std? Nimm VHDL 2008, dann kannst Du [vhdl] case t is when 8d"1" => i <= i + 1; when 8d"2" => i <= i + 2; ... end case [/vhdl] schreiben. Und wenn dir das nicht gefällt (oder deine Tools kein VHDL2008 können), dann schreib': [vhdl] case to_integer(t) is when 1 => ... end case; [/vhdl]
-
Thread
Erfahrungsbericht Pins hochohmig schalten
Initialisierung mit 'Z': [vhdl] mcb3_dram_dq : inout std_logic_vector(15 downto 0):= (others => 'Z'); [/vhdl] Leider ohne gewünschtes Ergebniss, der FPGA wird verdächtig heiss (Finger unangenehm heiss, gemessen 51°C). Der FPGA ist zu einem prozent ausgelastet. Die Lösung brachte erst
termination resistors will always be present whenever the I/O is 3-stated, and instantly turned off when the output buffer is enabled." MfG,
-
Thread
Verständnisfrage Kombinatorischer Prozess
TRANSITION_LOGIC : process( state , i ) begin next_state <= state ; case( state) is when "00" => if i = ’1’ then next_state <= "01"; else next_state <= "00"; end if; when "01" => if i = ’1’ then next_state <= "10"; else next_state <= "00"; end if; when "10" => if i = ’1’ then next_state <= "10"; else next_state <= "00"; end if; when others => next_state <= "00"; end case; end process;[/code]
-
Thread
Programm läuft nur im Simulator
du anders schreiben: [vhdl] MUX_1: process(MIN_S, c_szeh_int, sec) begin case MIN_S is when '1' => c_szer_int <= sec; when others => c_szer_int <= c_szeh_int; end case; end process MUX_1; [/vhdl] Nämlich so: [vhdl] c_szer_int <= sec when MIN_S='1' else c_szeh_int; [/vhdl]
-
Thread
"Guter Programmierstil" VHDL
- Wenn ich eine Decoderlogik baue, dann steht halt als record-name innerhalb eines 'if' oder 'when' der Gesamtname, z.B. [vhdl] hugo <= hregs.hugo when ..... else tgt1.hugo when ..... else meier.hugo when others; [/vhdl] Auch hier kurze aber aussagefaehige Namen und ich muss
stimme ich zu. So lässt sich das VHDL sicherer bauen. Komisch an dem Buch ist auch der Hinweis, WHEN und WITH nicht zu verwenden.
-
Thread
VHDL, FPGA, RAM, Anfängerfrage
ganz grob so aus: p1: process (CLK) begin if rising_edge(CLK) case COMMAND is when C0 => D0 <= DATA; when C1 => D1 <= DATA; ... end case; end if; end process p1 Soweit kein Problem, auch wenn ich vielleicht einige Syntax-Fehler getippt habe und sicher noch
BUS_UC_WIDTH - 1 downto 0); -- Daten FPGA -> uC : -- Bustreiberumschaltung UC_DATA <= UC_DOUT when UC_WE='0' else (others=>'Z'); UC_DIN <= UC_DATA; [/vhdl] Das asynchrone Umschalten des IO-Treibers ist nötig, weil du sonst immer wieder einen Buskonflikt oder einen offenen Bus hast. Ich
-
Thread
inout Signal und die Simulation
inout STD_LOGIC_VECTOR(7 downto 0); ... ext_rw_data: process(CLK, CLEAR) ... begin DATA <=(others =>'Z'); ............. [pre] if (RW='0') then byte_count := byte_count + 1; if byte_count = 1 then var_start := DATA; end if; if var_start = X"AA" then if byte_count
std_logic_vector(7 downto 0); [/pre] als Concurrent Statement: [pre] DATA <= WriteData when WriteEnable = '1' else (others => 'Z'); ReadData <= DATA; [/pre] Danach nur mehr mit Write/ReadData und WriteEnable arbeiten, so hast du eine saubere Beschreibung des Tri-States. Gibt der Simulator
-
Thread
Hilfe beim lesen von Daten
std_logic_vector(17 downto 0); begin process(rst,clk) begin if(rst = '1') then d_out_1 <= (others => '0'); w_out <= '0'; elsif (clk = '1') and clk'event then if (enable_w = '1' and full = '0') then w_out <= '1'; d_out_1 <= std_logic_vector
Ist der Resetimpuls lang genug? [pre] When reset is implemented, it is synchronized internally to the core with each respective clock domain for setting the internal logic of the FIFO to a known state. [/pre] BTW: bitte die VHDL Tags
-
Thread
Quartus II Clock
-- asynchronous reset (active low) -- s_10khzen <= '0'; -- s_enctr <= (others => '0'); -- elsif clk48'event and clk48 = '1' then -- rising clock edge -- -- Enable signal is inactive per default. -- s_10khzen <= '0'; -- if s_enctr /= C_ENCOUNTVAL then
the counter. -- s_enctr <= unsigned(s_enctr) + conv_unsigned(1,1); -- else -- When the terminal count is reached, set enable flag and reset the -- counter. -- s_enctr <= (others => '0'); -- s_10khzen <= '1'; -- end if; -- end if; --end process
-
Thread
Altera Fitter igoriert Constraint
addr ist der Eingang [vhdl] process(clk50, reset) begin if reset = '0' then addr_x <= (others => '0'); .... elsif rising_edge(clk50) then addr_x <= addr; ... end if; end process; [/vhdl] Ich habe leider schon öfter die Erfahrung gemacht, dass der Fitter von Altera
(Teil eines asnychronen Bus-Interface): [vhdl] -- Tristate the Output-Pin data <= rd_data_q when (OEn = '0' and CSn = '0') else (OTHERS => 'Z'); [/vhdl] Der virtuelle Takt für die externen Signale beträgt 200 Mhz und für den Pfad ist ein Multicycle von 3 constrained. SDC: create_clock
-
Thread
EMBEDDED SYSTEM
<= Idle; nr_of_reads <= 0; nr_of_writes <= 0; sum <= (others => '0'); else case state is when Idle => if (FSL_S_Exists = '1') then state <= Read_Inputs; nr_of_reads <= NUMBER_OF_INPUT_WORDS - 1; sum <= (others => '0'); end if; when Read_Inputs => if (FSL_S_Exists = '1') then -- Coprocessor function (Adding) happens here sum <= "
-
Thread
Elektronik-Stammtisch (Attraktor, Hamburg):FPGA/ PSHDL-Workshop
man braucht nicht für jeden Furz einen Prozess: -- Zähler mit asynchronem Reset reg <= (others=>'0') when reset='1' else reg+1 when rising_edge(clk); -- oder: Zähler mit synchronem Reset reg <= reg+1 and (reg'range=>(not reset)) when rising_edge(clk); end; [/vhdl] Fpga Kuechle
-
Thread
Bekomme Matlab-IIR-Lowpass nicht zum laufen. Timingprobleme?
since it's a logical AND between -- user_r_read_32_empty and has_been_full. has_been_full goes high when the -- FIFO is full, so it's guaranteed that user_r_read_32_empty is low when -- that happens. On the other hand, user_r_read_32_empty is a FIFO's empty -- signal, which naturally meets the requirement
delay_process_section1 : PROCESS (clk, reset) BEGIN IF reset = '1' THEN delay_section1 <= (OTHERS => (OTHERS => '0')); ELSIF clk'event AND clk = '1' THEN IF clk_enable = '1' THEN delay_section1(1) <= delay_section1(0); delay_section1(0) <= typeconvert1; END
-
Thread
Programmieren des LTC2287 Dual 10-Bit ADCs
begin if reset = '1' then enable_out <= '0'; Dout1 <= (others=>'0'); Dout2 <= (others=>'0'); elsif rising_edge (CLK) then Dout1 <= Real_in_from_ADC ; Dout2 <= imag_in_from_ADC;
recommended), use this command: set_property SEVERITY {Warning} [get_drc_checks UCIO-1]. NOTE: When using the Vivado Runs infrastructure (e.g. launch_runs Tcl command), add this command to a .tcl file and add that file as a pre-hook for write_bitstream step for the implementation run. Problem
-
Thread
Input als Array
std_logic := '0'; SIGNAL EN : std_logic := '0'; SIGNAL value : std_logic_vector(0 to 7) := (others=>'0'); --Outputs SIGNAL channel : std_logic_vector(7 downto 0); constant PERIOD : time := 40 ns; constant DUTY_CYCLE : real := 0.5; constant OFFSET : time := 0 ns; BEGIN
"00000000"; END LOOP; else if EN = '1' then case nstate is when STATE0 => channel_int <= "00000000"; value_help(0) <= value_help(0) + 1; if value_help(0) = "11111111" then channel_int(0) <= '0'; end if;
-
Thread
Xilinx ISE: output pad net 'locked_s' has an illegal load:
nun dieses Signal auf den Reset Zweig meines Designs zu geben. Hier der Code: [vhdl] rst_s <= '0' when locked_s = '0' else '1'; [/vhdl] In der Simulation läuft's, aber ISE schmeisst mir die folgende Fehlermeldung raus: ERROR:NgdBuild:462 - output pad net 'locked_s' drives multiple buffers:
warum bastelt das tool inverter in den resetpfad? (3) du kannst statt [vhdl] rst_s <= '0' when locked_s = '0' else '1'; [/vhdl] natürlich auch [vhdl] rst_s <= locked_s; [/vhdl] schreiben, falls die typen passen. (4) Legst du locked_s auch auf ein Ausgangspin des FPGA? vielleicht
-
Thread
Frage zu Cast
] constant c10ms : std_logic_vector(iReactDurS'high downto 0) := (3 downto 0 => "1010", others => '0'); [/vhdl] Du wirst übrigens ein Problem haben bzw. bekommen können, denn uneingeschränkte Vektoren haben die Zählrichtung (0 to x). Du kannst also durchaus Probleme bei der Zuweisung und
: unsigned(vector'high downto 0); begin var <= unsigned(vector); equal <= '1' when var = const else '0'; less <= '1' when var < const else '0'; greater <= '1' when var > const else '0'; end Behavioral; [/vhdl]
-
Thread
Akkutausch Bose Soundlink Mini (Zellen ersetzen)
I can confirm cut off old cell from bms not causing bms locked but you need cut in the rightway : when open box cut b+ , bm, b- when installed b- bm b+ , if you cut random it can cause bms locked For sure when install new cell let bms is free for 2-3 weeks Next problem : The bms for bose mini 1
want to discuss is that where in the bms can connect or read the data on the bms My experiment : when i replace battery first time the bms is not locked but when i reinstall the pack causing airleak and plug out battery and careless cut off wire random, cause bms locked so i have to buy a new one ,
-
Thread
VHDL timing in GMII auf Spartan6
ganzen asynchronen kombinatorischen Resets raus: [vhdl] if counterrx="000" then countertx<=(others=>'0'); : if state_txout = start then tx_paket <= '0'; : [/vhdl] Als Beispiel: countertx glitcht /garantiert/ beim zählen. Und was, wenn der Zähler beim Übergang von 1 nach
Welche Warnungen bekommst du eigentlich für diesen Taktmultiplexer? [vhdl] ether_clk <= phy_rx_clk when gmii_active = '1' else PHY_TX_CLK; [/vhdl] Und ich bin mir gar nicht so sicher, das es die Timing Constraints da drüber schaffen. Du solltest für so eine Taktumschaltung den Taktmanager verwenden.
-
Thread
Case in Top-Entity
folgende Fehlermeldungen raus: Line 98. parse error, unexpected CASE Line 111. parse error, unexpected WHEN Line 122. parse error, unexpected CASE, expecting SEMICOLON Für mich sieht es danach aus, dass die Case- Anweisung an einem falschen Platz innerhalb der Entity steht, bloß weiß ich nicht wo sie
component; for RTC for CAN for MST_AMBA begin Selekt:Process (SLV_SEL) case SLV_SEL is when "000" => --RTC ... when others => --CAN- Controller ... end case; end process selekt; -- RTC - Port Map RTC_test: rtc... ) port map (... ); -- CAN - Port
-
Thread
check columns in a matrix
begin for i in 0 to 7 loop if unsigned(matrix(0 to 7)(i)) > 1 then matrix(0 to 7)(i) <= (others => '0'); end if; end loop; end process control;
funtionality: [vhdl] control : process(matrix) begin for i in 0 to 7 loop matrix(0 to 7)(i) <= (others => '0'); end loop; end process control; [/vhdl]
-
Thread
SPI-Modul(VHDL).bitte um Rat
case State is when Idle => if Ready_i = '1' then SS_o <= '0'; -- Select Slave aktive State <= Data_Transfer; -- Change state else State <=
end if; when Stop => SS_o <= '1'; -- Deselect slave end case; end if; end process; end rtl; [/vhdl]
-
Thread
HMCAD1511 Interface
Byte_Serdes_FCLK; end process; with TwoByte_Serdes_FCLK(7 downto 0) select Shift_val <= 0 when "00001111", 1 when "00011110", 2 when "00111100", 3 when "01111000", 4 when "11110000", 5 when "11100001", 6 when "11000011", 7 when others; Data_shift_0 <= TwoByte_Serdes_0(
connected to all other elements in the circuit. For proper functionality, io_reset has to be deasserted when the clocks to SERDES are stable. Due to this requirement, io_reset must be deasserted after some cycles of clk_reset deassertion. For 8:1 serialization, sixteen cycles delay of I/O clock between