library verilog;
use verilog.vl_types.all;
entity FLASH128K is
    generic(
        IDLE            : vl_logic_vector(0 to 3) := (Hi0, Hi0, Hi0, Hi0);
        READ_S1         : vl_logic_vector(0 to 3) := (Hi0, Hi0, Hi0, Hi1);
        READ_S2         : vl_logic_vector(0 to 3) := (Hi0, Hi0, Hi1, Hi0);
        PROG_S1         : vl_logic_vector(0 to 3) := (Hi0, Hi0, Hi1, Hi1);
        PROG_S2         : vl_logic_vector(0 to 3) := (Hi0, Hi1, Hi0, Hi0);
        PROG_S3         : vl_logic_vector(0 to 3) := (Hi0, Hi1, Hi0, Hi1);
        PROG_S4         : vl_logic_vector(0 to 3) := (Hi0, Hi1, Hi1, Hi0);
        SERA_S1         : vl_logic_vector(0 to 3) := (Hi0, Hi1, Hi1, Hi1);
        SERA_S2         : vl_logic_vector(0 to 3) := (Hi1, Hi0, Hi0, Hi0);
        SERA_S3         : vl_logic_vector(0 to 3) := (Hi1, Hi0, Hi0, Hi1);
        SERA_S4         : vl_logic_vector(0 to 3) := (Hi1, Hi0, Hi1, Hi0);
        MASE_S1         : vl_logic_vector(0 to 3) := (Hi1, Hi0, Hi1, Hi1);
        MASE_S2         : vl_logic_vector(0 to 3) := (Hi1, Hi1, Hi0, Hi0);
        MASE_S3         : vl_logic_vector(0 to 3) := (Hi1, Hi1, Hi0, Hi1);
        MASE_S4         : vl_logic_vector(0 to 3) := (Hi1, Hi1, Hi1, Hi0)
    );
    port(
        DOUT            : out    vl_logic_vector(31 downto 0);
        TBIT            : out    vl_logic;
        DIN             : in     vl_logic_vector(31 downto 0);
        ADDR            : in     vl_logic_vector(14 downto 0);
        PCLK            : in     vl_logic;
        CS              : in     vl_logic;
        AE              : in     vl_logic;
        OE              : in     vl_logic;
        PROG            : in     vl_logic;
        SERA            : in     vl_logic;
        MASE            : in     vl_logic;
        NVSTR           : in     vl_logic;
        IFREN           : in     vl_logic;
        RESETN          : in     vl_logic
    );
    attribute mti_svvh_generic_type : integer;
    attribute mti_svvh_generic_type of IDLE : constant is 1;
    attribute mti_svvh_generic_type of READ_S1 : constant is 1;
    attribute mti_svvh_generic_type of READ_S2 : constant is 1;
    attribute mti_svvh_generic_type of PROG_S1 : constant is 1;
    attribute mti_svvh_generic_type of PROG_S2 : constant is 1;
    attribute mti_svvh_generic_type of PROG_S3 : constant is 1;
    attribute mti_svvh_generic_type of PROG_S4 : constant is 1;
    attribute mti_svvh_generic_type of SERA_S1 : constant is 1;
    attribute mti_svvh_generic_type of SERA_S2 : constant is 1;
    attribute mti_svvh_generic_type of SERA_S3 : constant is 1;
    attribute mti_svvh_generic_type of SERA_S4 : constant is 1;
    attribute mti_svvh_generic_type of MASE_S1 : constant is 1;
    attribute mti_svvh_generic_type of MASE_S2 : constant is 1;
    attribute mti_svvh_generic_type of MASE_S3 : constant is 1;
    attribute mti_svvh_generic_type of MASE_S4 : constant is 1;
end FLASH128K;
