Перейти к содержанию
    

Maverick_

Модератор
  • Постов

    3 861
  • Зарегистрирован

Весь контент Maverick_


  1. Да просто надо понять, где ошибка и исправить) PS Кто ищет тот вседа найдет)
  2. попробуйте так module hamming_ecoder( input [3:0] data_in, output [6:0] ham_out ); wire p0,p1,p2; assign p0 = data_in[0] ^ data_in[1] ^ data_in[3]; assign p1 = data_in[0] ^ data_in[2] ^ data_in[3]; assign p2 = data_in[1] ^ data_in[2] ^ data_in[3]; assign ham_out = {data_in, p0, p1, p2}; endmodule `timescale 1ns / 1ps module hamming_encoder_tb(); reg [3:0] data_in; wire [6:0] ham_out; hamming_encoder DUT(data_in,ham_out); initial begin data_in = 4'h4; #10; data_in = 4'h0; #10; data_in = 4'h8; #10; data_in = 4'hF; #10; data_in = 4'hA; #10; data_in = 4'h9; #10; end endmodule
  3. Привет при генерации bitstream в vivado 2019.1 появляется ошибка во вложении файли описания и xdc файл помогите пожалуйста понять что не так adc_AD9627.vhd dual_adc_AD9627.vhd const.xdc top_adc_AD9627.vhd
  4. Раз речь пошла про tcl может кто то подскажет как написать tcl скрипт для помещения сигналов (из vhdl, verilog, SV описаних модулей) на waveform в ISIM (vivado) - желательно по модульно сгрупировано - лучше как в проекте соблюдая вложеность модулей (идеальное решение) Врукопашную добавлять сигналы дестков модулей напряжно... PS поделитесь плиз...
  5. Vivado: Set VHDL-2019 or VHDL-2008 for all .vhd files To tell Xilinx Vivado to compile a VHDL file using the newer VHDL-2019 or VHDL-2008 revisions in the GUI, you can go to Project Manager->Sources->Compile Order, right-click the .vhd file, and select Source File Properties. Then, you can click the Type property and change the VHDL revision using the dialog box. You have to right-click every single file to make the change. But you can easily change the VHDL revision of every single file in your project to 2019 by entering this command in the Vivado GUI’s Tcl Console: set_property FILE_TYPE {VHDL 2019} [get_files *.vhd] Or set all .vhd files to 2008 with this Tcl command: set_property FILE_TYPE {VHDL 2008} [get_files *.vhd]
  6. не знал... думал что PS меня не путает, упрощает жизнь
  7. добавлю + использовать стандарт VHDL 2008 как минимум чтоби не писать process(SPI_CLK) а писать process(all)
  8. поставьте двунаправленные буфера и логику которая б переключала прием/передача как вариант... PS для Quad Serial Peripheral Interface (Quad-SPI) должно быть 6 линий
  9. сделайте промежуточную логику или измените свою...
  10. еще раз как другой модуль узнает что надо выставить новые даные DATA_IN ???
  11. я бы применял сигналы, без variable clk_count : integer range 0 to 2 := 0; как формируется подача DATA_IN ??? я не вижу однобитного сигнала запроса данных DATA_IN
  12. DSP48 тратить на счетчики на мой взгляд дорогое удовольствие - можно такое делать когда других вариантов нет
  13. я в свое время написал аналогичный модуль library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; entity delay_line is generic( W : integer := 8; -- data width L : integer := 1200); -- delay length, shall be > 3 port( i_clk : in std_logic; i_sync_reset : in std_logic; i_data : in std_logic_vector(W-1 downto 0); o_data : out std_logic_vector(W-1 downto 0)); end delay_line; architecture rtl of delay_line is type t_ram is array (L-2 downto 0) of std_logic_vector(W-1 downto 0); signal m_ram : t_ram; signal r_addr_wr : integer range 0 to L-2; signal r_addr_rd : integer range 0 to L-2; signal r_enable_read : std_logic; begin p_write : process (i_clk) begin if rising_edge(i_clk) then if(i_sync_reset='1') then r_addr_wr <= 0; r_enable_read <= '0'; else m_ram(r_addr_wr) <= i_data; if(r_addr_wr<L-2) then r_addr_wr <= r_addr_wr + 1; else r_addr_wr <= 0; r_enable_read <= '1'; -- enable reading section end if; end if; end if; end process p_write; p_read : process (i_clk) begin if rising_edge(i_clk) then if(i_sync_reset='1') then r_addr_rd <= 0; else if(r_enable_read='1') then o_data <= m_ram(r_addr_rd) ; -- additional delay if(r_addr_rd<L-2) then r_addr_rd <= r_addr_rd + 1; else r_addr_rd <= 0; end if; end if; end if; end if; end process p_read; end rtl; тоже по кольцу пишет, но может обеспечить задержку... PS все предложенное варианты реализации фифо... Вам предложу рассмотреть реализацию счетчика на базе конвеера из более мелких счетчиков, должно повысить тактовую частоту...
  14. автомат точно отрабатывает на симуляции все состояния? может у Вас есть асинхронщина?
  15. вот на верилоге с тестбенчем для симуляции This example is a multistage modulus counter that reports elapsed operational time. The outputs report days, hours, minutes, seconds, milliseconds, and microseconds based on the system clock. It wraps to zero after 1024 days. The pulse outputs can be handy for periodic updates in control systems. PS AHDL - это мёртвый язык. system_timer_tb.v system_timer.v
  16. рассмотрите вариант память на LUT RAM (массив однобитных сдвигающих регистров на 32/64 битных) как вариант
  17. память может бы и из регистров или на LUT RAM не обязательно использовать всегда BLOCKRAM
  18. можно вместо фифо использовать блочную память для данных потом логикой вычитывать формируя таким образом пакет данных wave.do bram_tdp.vhd c.do package_formation.vhd package_formation_vhd_tst.vhd
  19. vladec Вы сначала зайдите хотя бы по ссылке с описанием работы - почитайте/посмотрите видео, а потом пишите...
  20. что скажите насчет такой корки - АЦП на базе логики FPGA: https://github.com/LukiLeu/FPGA_ADC - реализация https://dl.acm.org/doi/10.1145/3431920.3439287 - описание работы с видео, рассказывающем как работает и архитектуру "развод" или правда? + https://habr.com/ru/articles/352276/
  21. вот взято с темплате vivado2019.1 для verilog // Asynchronous Input Synchronization // // The following code is an example of synchronizing an asynchronous input // of a design to reduce the probability of metastability affecting a circuit. // // The following synthesis and implementation attributes is added to the code // in order improve the MTBF characteristics of the implementation: // // ASYNC_REG="TRUE" - Specifies registers will be receiving asynchronous data // input to allow tools to report and improve metastability // // The following parameters are available for customization: // // SYNC_STAGES - Integer value for number of synchronizing registers, must be 2 or higher // PIPELINE_STAGES - Integer value for number of registers on the output of the // synchronizer for the purpose of improveing performance. // Particularly useful for high-fanout nets. // INIT - Initial value of synchronizer registers upon startup, 1'b0 or 1'b1. parameter SYNC_STAGES = 3; parameter PIPELINE_STAGES = 1; parameter INIT = 1'b0; wire <sync_out>; (* ASYNC_REG="TRUE" *) reg [SYNC_STAGES-1:0] sreg = {SYNC_STAGES{INIT}}; always @(posedge clk) sreg <= {sreg[SYNC_STAGES-2:0], async_in}; generate if (PIPELINE_STAGES==0) begin: no_pipeline assign sync_out = sreg[SYNC_STAGES-1]; end else if (PIPELINE_STAGES==1) begin: one_pipeline reg sreg_pipe = INIT; always @(posedge clk) sreg_pipe <= sreg[SYNC_STAGES-1]; assign sync_out = sreg_pipe; end else begin: multiple_pipeline (* shreg_extract = "no" *) reg [PIPELINE_STAGES-1:0] sreg_pipe = {PIPELINE_STAGES{INIT}}; always @(posedge clk) sreg_pipe <= {sreg_pipe[PIPELINE_STAGES-2:0], sreg[SYNC_STAGES-1]}; assign sync_out = sreg_pipe[PIPELINE_STAGES-1]; end endgenerate для vhdl -- Asynchronous Input Synchronization -- -- The following code is an example of synchronizing an asynchronous input -- of a design to reduce the probability of metastability affecting a circuit. -- -- The following synthesis and implementation attributes are added to the code -- in order improve the MTBF characteristics of the implementation: -- -- ASYNC_REG="TRUE" - Specifies registers will be receiving asynchronous data -- input to allow tools to report and improve metastability -- -- The following constants are available for customization: -- -- SYNC_STAGES - Integer value for number of synchronizing registers, must be 2 or higher -- PIPELINE_STAGES - Integer value for number of registers on the output of the -- synchronizer for the purpose of improveing performance. -- Particularly useful for high-fanout nets. -- INIT - Initial value of synchronizer registers upon startup, 1'b0 or 1'b1. -- Insert the following before begin keyword of architecture constant SYNC_STAGES : integer := 3; constant PIPELINE_STAGES : integer := 1; constant INIT : std_logic := '0'; signal <sync_out> : std_logic; -- Synchronized output signal sreg : std_logic_vector(SYNC_STAGES-1 downto 0) := (others => INIT); attribute async_reg : string; attribute async_reg of sreg : signal is "true"; signal sreg_pipe : std_logic_vector(PIPELINE_STAGES-1 downto 0) := (others => INIT); attribute shreg_extract : string; attribute shreg_extract of sreg_pipe : signal is "false"; -- Insert the following in the architecture after the begin keyword process(<clk>) begin if(<clk>'event and <clk>='1')then sreg <= sreg(SYNC_STAGES-2 downto 0) & <async_in>; -- Async Input <async_in> end if; end process; no_pipeline : if PIPELINE_STAGES = 0 generate begin <sync_out> <= sreg(SYNC_STAGES-1); end generate; one_pipeline : if PIPELINE_STAGES = 1 generate begin process(<clk>) begin if(<clk>'event and <clk>='1') then <sync_out> <= sreg(SYNC_STAGES-1); end if; end process; end generate; multiple_pipeline : if PIPELINE_STAGES > 1 generate begin process(<clk>) begin if(<clk>'event and <clk>='1') then sreg_pipe <= sreg_pipe(PIPELINE_STAGES-2 downto 0) & sreg(SYNC_STAGES-1); end if; end process; <sync_out> <= sreg_pipe(PIPELINE_STAGES-1); end generate;
×
×
  • Создать...