traduccion de codigo en VHDL
Publicado: 10 Feb 2019, 01:18
Estoy intentando traducir este código en VHDL a Verilog, pero no encuentro la forma de hacerlo ya que me da un error si intento usar en el mismo bloque el flanco de bajada y el de subida.
En su lugar he puesto esto, aunque no es lo mismo, por lo que tengo mucha curiosidad de si es posible hacer una traduccion exacta del codigo anterior a Verilog.
Código: Seleccionar todo
process( mcu_clk, mcu_kbd, mcu_reset)
begin
if ( mcu_reset = '1' ) then
kb_addr <= 0;
else
if ( rising_edge( mcu_clk )) then
-- read the key status from the micro-controller
-- if the bit is '1' that means the key is pressed
kb_data( conv_integer(kb_addr) ) <= mcu_kbd;
end if;
if ( falling_edge( mcu_clk )) then
-- increment the pointed to the address of the next 5
kb_addr <= kb_addr + 1;
end if;
end if;
end process;
Código: Seleccionar todo
always@(posedge Ard_CLK or posedge Ard_Reset) begin
if (Ard_Reset == 1'b1)
offset <= 6'b0;
else begin
buff[offset] <= Ard_Data;
offset <= offset + 1;
end
end