  #==============================================================================
  # Set up modelsim work library
  #==============================================================================


vlib hispi_lib_ecp3
set TARGET_DEVICE ecp3


set LATTICE_SRC C:/lscc/diamond/1.1/cae_library/simulation/verilog/$TARGET_DEVICE

#==== compile

vlog -y $LATTICE_SRC +libext+.v \
-y $LATTICE_SRC/../pmi +libext+.v \
../../rtl/parser.v \
../../rtl/parser_hdr.v \
../../rtl/lane_aligner.v \
../../rtl/word_aligner.v \
../../rtl/multi_lane_align.v \
../../rtl/hispi_hdr_rx_core.v \
../../rtl/hispi_rx_core.v

vsim +access +r hispi_design.hispi_rx_core -L lib_hispi