Changeset 183

Show
Ignore:
Timestamp:
11.11.2008 18:06:44 (2 months ago)
Author:
seb
Message:

System booting in simulator

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • boards/xilinx-ml401/rtl/ddram.v

    r181 r183  
    6464 
    6565`ifdef ENABLE_DDRAM 
     66 
     67`ifndef SIMULATION 
    6668wire sys_clk2x; 
    6769wire sys_clkfb; 
     
    101103        .RST(1'b0) 
    102104); 
    103  
     105`else 
     106reg sys_clk2x; 
     107initial sys_clk2x = 1'b0; 
     108always @(posedge sys_clk) begin 
     109        #0.5 sys_clk2x = 1'b1; 
     110        #2.5 sys_clk2x = 1'b0; 
     111        #2.5 sys_clk2x = 1'b1; 
     112        #2.5 sys_clk2x = 1'b0; 
     113end 
     114`endif 
     115 
     116`ifndef SIMULATION 
    104117DCM_BASE #( 
    105118        .CLKDV_DIVIDE(1.5),             // 1.5,2.0,2.5,3.0,3.5,4.0,4.5,5.0,5.5,6.0,6.5 
     
    136149        .RST(1'b0) 
    137150); 
    138  
     151`else 
     152assign sdram_clk_p = sys_clk; 
     153assign sdram_clk_n = ~sys_clk; 
     154`endif 
    139155 
    140156hpdmc #( 
  • boards/xilinx-ml401/rtl/setup.v

    r181 r183  
    2626 * able to cut down synthesis times. 
    2727 */ 
    28 `define ENABLE_GPIO 
    29 `define ENABLE_ACEUSB 
    30 `define ENABLE_DDRAM 
    31 `define ENABLE_INTC 
    32 `define ENABLE_TIMER 
     28//`define ENABLE_GPIO 
     29//`define ENABLE_ACEUSB 
     30//`define ENABLE_DDRAM 
     31//`define ENABLE_INTC 
     32//`define ENABLE_TIMER 
    3333//`define ENABLE_VGA 
    3434//`define ENABLE_AC97 
  • boards/xilinx-ml401/rtl/system.v

    r182 r183  
    8585wire sys_clk; 
    8686 
     87`ifndef SIMULATION 
    8788BUFG clkbuf( 
    8889        .I(clkin), 
    8990        .O(sys_clk) 
    9091); 
    91  
     92`else 
     93assign sys_clk = clkin; 
     94`endif 
     95 
     96`ifndef SIMULATION 
    9297reg rst0; 
    9398reg rst1; 
     
    103108        sys_rst <= rst_debounce != 16'h0000; 
    104109end 
     110`else 
     111wire sys_rst = resetin; 
     112`endif 
    105113 
    106114//------------------------------------------------------------------ 
     
    451459                brgbus_dat_w; 
    452460 
    453 wire [3:0]    vgabus_sel, 
     461wire [7:0]    vgabus_sel, 
    454462                brgbus_sel; 
    455463 
     
    476484                extmem_dat_w; 
    477485 
    478 wire [3:0]    extmem_sel; 
     486wire [7:0]    extmem_sel; 
    479487 
    480488wire            extmem_we; 
  • boards/xilinx-ml401/rtl/vga.v

    r180 r183  
    4141        output [63:0] wb_dat_o, 
    4242        input [63:0] wb_dat_i, 
    43         output [3:0] wb_sel_o, 
     43        output [7:0] wb_sel_o, 
    4444        output wb_cyc_o, 
    4545        output wb_stb_o, 
  • cores/brg64/rtl/brg64.v

    r180 r183  
    3636        output [31:0] wb64_adr_o, 
    3737        output [2:0] wb64_cti_o, 
    38         output [31:0] wb64_dat_o, 
    39         input [31:0] wb64_dat_i, 
    40         output [3:0] wb64_sel_o, 
     38        output [63:0] wb64_dat_o, 
     39        input [63:0] wb64_dat_i, 
     40        output [7:0] wb64_sel_o, 
    4141        output wb64_cyc_o, 
    4242        output wb64_stb_o, 
  • cores/conbus/rtl/conbus_highspeed.v

    r180 r183  
    3636        input   [31:0]  m0_adr_i, 
    3737        input   [2:0]   m0_cti_i, 
    38         input   [3:0] m0_sel_i, 
     38        input   [7:0] m0_sel_i, 
    3939        input           m0_we_i, 
    4040        input           m0_cyc_i, 
     
    4747        input   [31:0]  m1_adr_i, 
    4848        input   [2:0]   m1_cti_i, 
    49         input   [3:0] m1_sel_i, 
     49        input   [7:0] m1_sel_i, 
    5050        input           m1_we_i, 
    5151        input           m1_cyc_i, 
     
    5858        input   [31:0]  m2_adr_i, 
    5959        input   [2:0]   m2_cti_i, 
    60         input   [3:0] m2_sel_i, 
     60        input   [7:0] m2_sel_i, 
    6161        input           m2_we_i, 
    6262        input           m2_cyc_i, 
     
    6969        input   [31:0]  m3_adr_i, 
    7070        input   [2:0]   m3_cti_i, 
    71         input   [3:0] m3_sel_i, 
     71        input   [7:0] m3_sel_i, 
    7272        input           m3_we_i, 
    7373        input           m3_cyc_i, 
     
    8080        output  [31:0]  s_adr_o, 
    8181        output  [2:0]   s_cti_o, 
    82         output  [3:0] s_sel_o, 
     82        output  [7:0] s_sel_o, 
    8383        output          s_we_o, 
    8484        output          s_cyc_o, 
     
    9292// address width + CTI + data width + byte select width 
    9393// + cyc + we + stb 
    94 `define mbusw_hs  32 + 3 + 64 + 4 + 3 
     94`define mbusw_hs  32 + 3 + 64 + 8 + 3 
    9595 
    9696wire [3:0] i_gnt_arb; 
  • cores/uart/rtl/uart.v

    r180 r183  
    110110                        endcase 
    111111                end else if (wb_wr & ~wb_ack_o ) begin 
     112`ifdef SIMULATION 
     113                        $display("UART TX: %x", tx_data); 
     114`endif 
    112115                        wb_ack_o <= 1'b1; 
    113116 
  • software/bios/crt0.S

    r178 r183  
    2323                        .ent _start 
    2424_start:                 brai    _start1 
    25 _vector_sw_exception:   brai    _exception_handler 
    26 _vector_interrupt:      brai    _interrupt_handler 
    27 _vector_breakpoint:     brai    _breakpoint_handler 
    28 _vector_hw_exception:   brai    _hw_exception_handler 
     25_vector_sw_exception:   brai    _start1 
     26_vector_interrupt:      brai    _start1 
     27_vector_breakpoint:     brai    _start1 
     28_vector_hw_exception:   brai    _start1 
    2929 
    3030/* ------ crt starts here --------- */ 
     
    3333        la r13, r0, _SDA_BASE_ 
    3434        la r2, r0, _SDA2_BASE_ 
    35         la r1, r0, _stack               # stack is at end of block-ram 
     35        la r1, r0, _stack 
     36         
     37        brlid   r15,_program_init /* lock one thread */ 
     38        nop 
    3639                 
    3740_crtinit:                               /* clear sbss */ 
     
    5760.Lendbss: 
    5861 
    59         brlid   r15,_program_init 
    60         nop 
    6162        brlid   r15,main                # enter main program (ignoring parameters: r5, r6 & r7) 
    6263        nop                             # fall throught to exit 
    6364        .end _start 
    64  
    65 _interrupt_handler: brai        0xc0000008 # Jump to the get_interrupt label of the kernel, see arch/microblaze/head.S for more details 
    66 _exception_handler: 
    67 _breakpoint_handler: 
    68 _hw_exception_handler: 
    6965 
    7066        .globl exit                     # exit library call  
  • software/bios/main.c

    r178 r183  
    153153static void memtest() 
    154154{ 
    155         unsigned int testbuf[TESTBUF_SIZE]
     155        unsigned int *testbuf = (unsigned int *)0x80000000
    156156        unsigned int i; 
    157157         
     
    251251int main(int argc, char **argv) 
    252252{ 
    253         char buffer[128]; 
     253        char buffer[16]; 
    254254         
    255255        putsnonl(banner); 
     
    260260        while(1) { 
    261261                putsnonl("BIOS> "); 
    262                 readstr(buffer, 128); 
     262                readstr(buffer, 16); 
    263263                do_command(buffer); 
    264264        } 
  • software/include.mak

    r178 r183  
    2020ASFLAGS=$(INCLUDES) -DTARGET=$(TARGET) 
    2121CFLAGS=-O2 -Wall -mtune=v5.00 -mxl-soft-div -msoft-float -mxl-barrel-shift -mno-xl-soft-mul $(INCLUDES) -DTARGET=$(TARGET) -fno-builtin 
    22 LDFLAGS=-s -nostdlib -nodefaultlibs 
     22LDFLAGS=-nostdlib -nodefaultlibs 
    2323 
    2424# HW options