OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [or1k_startup/] [rtl/] [verilog/] [OR1K_startup_module_inst.v] - Blame information for rev 201

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 marcus.erl
OR1K_startup OR1K_startup0
2
  (
3
    .wb_adr_i(wbs_rom_adr_i[6:2]),
4
    .wb_stb_i(wbs_rom_stb_i),
5
    .wb_cyc_i(wbs_rom_cyc_i),
6
    .wb_dat_o(wbs_rom_dat_o),
7
    .wb_ack_o(wbs_rom_ack_o),
8
    .wb_clk(wb_clk),
9
    .wb_rst(wb_rst)
10
   );
11
 
12
wire spi_flash_mosi, spi_flash_miso, spi_flash_sclk;
13
wire [1:0] spi_flash_ss;
14
 
15
spi_flash_top #
16
  (
17
   .divider(`SPI_FLASH_DIVIDER),
18
   .divider_len(`SPI_FLASH_DIVIDER_LEN)
19
   )
20
spi_flash_top0
21
  (
22
   // Wishbone signals
23
   .wb_clk_i(wb_clk),
24
   .wb_rst_i(wb_rst),
25
   .wb_adr_i(wbs_spi_flash_adr_i[4:2]),
26
   .wb_dat_i(wbs_spi_flash_dat_i),
27
   .wb_dat_o(wbs_spi_flash_dat_o),
28
   .wb_sel_i(wbs_spi_flash_sel_i),
29
   .wb_we_i(wbs_spi_flash_we_i),
30
   .wb_stb_i(wbs_spi_flash_stb_i),
31
   .wb_cyc_i(wbs_spi_flash_cyc_i),
32
   .wb_ack_o(wbs_spi_flash_ack_o),
33
   // SPI signals
34
   .mosi_pad_o(spi_flash_mosi),
35
   .miso_pad_i(spi_flash_miso),
36
   .sclk_pad_o(spi_flash_sclk),
37
   .ss_pad_o(spi_flash_ss)
38
   );
39
 
40
// external SPI FLASH
41
assign spi_flash_mosi_pad_o = !spi_flash_ss[0] ? spi_flash_mosi : 1'b1;
42
assign spi_flash_sclk_pad_o = !spi_flash_ss[0] ? spi_flash_sclk : 1'b1;
43
assign spi_flash_ss_pad_o   =  spi_flash_ss[0];
44
assign spi_flash_w_n_pad_o    = 1'b1;
45
assign spi_flash_hold_n_pad_o = 1'b1;
46
 
47
// external SD FLASH in SPI mode
48
assign spi_sd_mosi_pad_o = !spi_flash_ss[1] ? spi_flash_mosi : 1'b1;
49
assign spi_sd_sclk_pad_o = !spi_flash_ss[1] ? spi_flash_sclk : 1'b1;
50
assign spi_sd_ss_pad_o   =  spi_flash_ss[1];
51
 
52
// input mux
53
assign spi_flash_miso = !spi_flash_ss[0] ? spi_flash_miso_pad_i :
54
                        !spi_flash_ss[1] ? spi_sd_miso_pad_i :
55
                        1'b0;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.