А код с case был такой:
Код
-- -- DATAOUT MX reg -> registers read
-- process(CLK100, sreg_addr, sreg_test, sreg_pfd0, sreg_pfd1)
-- begin
-- if(rising_edge(CLK100)) then
-- case(sreg_addr) is
-- when SREG_TEST_ADDR => -- read Test reg
-- dataout_reg(15 downto 0)<=x"00" & sreg_test(7 downto 0);
-- when SREG_PFD0_ADDR => -- read Pulse Freq Div 0 reg
-- dataout_reg(15 downto 0)<=x"00" & sreg_pfd0(7 downto 0);
-- when SREG_PFD1_ADDR => -- read Pulse Freq Div 1 reg
-- dataout_reg(15 downto 0)<=x"00" & sreg_pfd1(7 downto 0);
-- when SREG_PW0_ADDR => -- read Pulse Width 0 reg
-- dataout_reg(15 downto 0)<=x"00" & sreg_pw0(7 downto 0);
-- when SREG_PW1_ADDR => -- read Pulse Width 1 reg
-- dataout_reg(15 downto 0)<=x"00" & sreg_pw1(7 downto 0);
-- when SREG_PCTL_ADDR => -- read Pulse Control reg
-- dataout_reg(15 downto 0)<=x"00" & sreg_pctl(7 downto 0);
-- when SREG_NCMD_ADDR => -- read NAND flash command reg
-- dataout_reg(15 downto 0)<=x"00" & sreg_ncmd(7 downto 0);
-- when SREG_NSTA_ADDR => -- read NAND flash status reg
-- dataout_reg(15 downto 0)<="0000000" & nand_busy & sreg_nsta(7 downto 0);
-- when SREG_NRWC_ADDR => -- read NAND flash read/write counter reg
-- dataout_reg(15 downto 0)<=sreg_nrwc(15 downto 0);
-- when SREG_NADR1_ADDR => -- read NAND flash Address 1 reg
-- dataout_reg(15 downto 0)<=x"00" & sreg_nadr1(7 downto 0);
-- when SREG_NADR2_ADDR => -- read NAND flash Address 2 reg
-- dataout_reg(15 downto 0)<=x"00" & sreg_nadr2(7 downto 0);
-- when SREG_NADR3_ADDR => -- read NAND flash Address 3 reg
-- dataout_reg(15 downto 0)<=x"00" & sreg_nadr3(7 downto 0);
-- when SREG_NADR4_ADDR => -- read NAND flash Address 4 reg
-- dataout_reg(15 downto 0)<=x"00" & sreg_nadr4(7 downto 0);
-- when SREG_NADR5_ADDR => -- read NAND flash Address 5 reg
-- dataout_reg(15 downto 0)<=x"00" & sreg_nadr5(7 downto 0);
-- when SREG_NID1_ADDR => -- read NAND flash ID 1 reg
-- dataout_reg(15 downto 0)<=x"00" & sreg_nid1(7 downto 0);
-- when SREG_NID2_ADDR => -- read NAND flash ID 2 reg
-- dataout_reg(15 downto 0)<=x"00" & sreg_nid2(7 downto 0);
-- when SREG_NID3_ADDR => -- read NAND flash ID 3 reg
-- dataout_reg(15 downto 0)<=x"00" & sreg_nid3(7 downto 0);
-- when SREG_NID4_ADDR => -- read NAND flash ID 4 reg
-- dataout_reg(15 downto 0)<=x"00" & sreg_nid4(7 downto 0);
-- when SREG_NID5_ADDR => -- read NAND flash ID 5 reg
-- dataout_reg(15 downto 0)<=x"00" & sreg_nid5(7 downto 0);
--
-- when others =>
-- dataout_reg(15 downto 0)<=x"FF" & x"FF";
-- end case;
-- end if;
-- end process;
Блин, может это все из-за CLK который я вставил вначале, я думал, что это все засинтезируется в mux + reg за ним. Завтра проверю.