- Config File:
8default_signal_polarity = '0'
9default_voltage_standard = 3.
3V
10pinout_filename = PINOUT.xdc
11alias srr is state_reg_rec(0);
12alias state_reg : integer is state_reg_rec(0).state_reg;
- VHDL Code:
2use ieee.std_logic_1164.
all;
3use ieee.numeric_std.
all;
4use ieee.std_logic_unsigned.
all;
5use work.user_defs_pkg.
all;
6use work.speakhdl_api_pkg.
all;
11 generic (this_sm : integer := -1);
15 sm_input : in std_logic_vector(-1 downto 0);
16 sm_output : out std_logic_vector(1 downto 0);
17 sm_io : inout std_logic_vector(-1 downto 0);
18 next_state_rec : out nsr_array(0 to 0);
19 state_reg_rec : in srr_array(0 to 0)
25architecture arch
of led_blink
is
27 alias led : std_logic_vector(1 downto 0) is sm_output(1 downto 0);
28 alias srr is state_reg_rec(0);
29 alias state_reg : integer is state_reg_rec(0).state_reg;
34 led(0) <= '1' when (srr.counter(0).value > sec(1)) else
36 led(1) <= '1' when (srr.counter(1).value > ms(500)) else
48 RESOURCE_SELECT( sys_clk, next_state_rec, state_reg_rec );
50 CONFIGURE_COUNTER( 0, sec(2), no_trans, next_state_rec, state_reg_rec );
51 CONFIGURE_COUNTER( 1, sec(1), no_trans, next_state_rec, state_reg_rec );
- See also
- sseg_display_example
-
uart_loopback_example
-
vga_controller_example