Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
21592 Discussions

nios top level ...

Altera_Forum
Honored Contributor II
1,208 Views

`define flash_word // use word mode of flash 

`ifdef flash_word 

wire flash_16bit_ip_a0; 

assign oflash_byte_n = 1'b1; // flash word mode configuration 

`else 

assign oflash_byte_n = 1'b0; // flash byte mode configuration 

`endif 

assign oflash_rst_n = 1'b1; // flash reset 

assign oflash_wp_n = 1'b1; // flash write protect/programming acceleration  

 

assign odram1_clk = odram0_clk; //fishy 

 

wire cpu_clk; 

 

what is the purpose for the `ifdef flash_word  

0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
484 Views

It tests to see if the compile-time macro "FLASH_WORD" is defined. If so, it sets the signal "oFLASH_BYTE_N" to 1 otherwise it sets "oFLASH_BYTE_N" to 0. Clearly what this is doing is selecting between 8-bit and 16-bit mode on an external flash device. 

 

Jake
0 Kudos
Reply