Changeset 34 in XOpenSparcT1


Ignore:
Timestamp:
04/08/11 11:08:37 (14 years ago)
Author:
pntsvt00
Message:

versione pre-pre-alpha

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sim/simula.do

    r27 r34  
    4949#vsim -c -t ps -novopt +notimingchecks work.tb_top glbl 
    5050 
    51 add wave sim:/tb_top/W1_inst/dram_wb_inst/* 
     51#add wave sim:/tb_top/W1_inst/dram_wb_inst/* 
    5252#exit 
    53 pause 
     53#pause 
    5454onerror {resume} 
    5555#Log all the objects in design. These will appear in .wlf file# 
    5656log -r /* 
     57run -all 
     58exit 
     59 
    5760#View sim_tb_top signals in waveform# 
    58 add wave sim:/tb_top/* 
     61#add wave sim:/tb_top/* 
    5962 
    6063#Change radix to Hexadecimal# 
  • trunk/sw/uart.c

    r33 r34  
    33const long UART_BASE_ADR[1] = {0x800000FFF0C2C000}; 
    44const int UART_BAUDS[1] = {0}; 
     5const int BAUD_RATE =100000; 
    56const int IN_CLK =50000000; 
    67 
     
    5960        long allone=0xffffffffffffffff; 
    6061        int divisor; 
    61         float float_divisor; 
     62        //float float_divisor; 
    6263        /* Reset receiver and transmiter */ 
    6364        REG8( UART_FCR ) = UART_FCR_ENABLE_FIFO | UART_FCR_CLEAR_RCVR | UART_FCR_CLEAR_XMIT | UART_FCR_TRIGGER_14; 
     
    7374         
    7475        /* Set baud rate */ 
    75         float_divisor = (float) IN_CLK/(16 * UART_BAUDS[core]); 
    76         float_divisor += 0.50f; // Ensure round up 
    77         divisor = (int) float_divisor; 
    78          
     76        //float_divisor = (float) IN_CLK/(16 * UART_BAUDS[core]); 
     77        //float_divisor += 0.50f; // Ensure round up 
     78        //divisor = (int) float_divisor; 
     79        divisor = BAUD_RATE; 
     80 
    7981        REG8(UART_BASE_ADR[core] + UART_LCR) |= UART_LCR_DLAB; 
    8082        REG8(UART_BASE_ADR[core] + UART_DLL) = divisor & 0x000000ff; 
Note: See TracChangeset for help on using the changeset viewer.