[an error occurred while processing this directive]
|
На VHDL:
LIBRARY ieee;
USE ieee.std_logic_1164.all;
USE ieee.std_logic_arith.all;
ENTITY tst_vhd IS
PORT(
clk : IN std_logic;
input_foo : IN std_logic;
reset : IN std_logic;
output_foo : OUT std_logic
);
END tst_vhd ;
ARCHITECTURE struct OF tst_vhd IS
BEGIN
process (clk,reset)
begin
if (reset = '1') then
output_foo <= '0' ;
elsif (clk'event and clk = '1') then
output_foo <= input_foo ;
end if ;
end process ;
END struct;
На Veriloge(я не силен в верилоге, если что не так, думаю меня поправят) А документ (Менторовский) могу послать
`resetall
`timescale 1ns/10ps
module tst_verilog(
clk,
input_foo,
reset,
output_foo
);
input clk;
input input_foo;
input reset;
output output_foo;
wire clk;
wire input_foo;
wire reset;
reg output_foo;
always @ (posedge clk or posedge reset)
if (reset)
output_foo = 1'b0 ;
else
output_foo = input_foo ;
endmodule // tst_verilog
E-mail: info@telesys.ru