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

Subversion Repositories darkriscv

[/] [darkriscv/] [trunk/] [rtl/] [config.vh] - Diff between revs 4 and 6

Show entire file | Details | Blame | View Log

Rev 4 Rev 6
Line 78... Line 78...
 
 
//`define __RMW_CYCLE__
//`define __RMW_CYCLE__
 
 
// muti-threading support:
// muti-threading support:
//
//
// Decreases clock performance by 20% (80MHz), but enables two contexts
// Decreases clock performance by 20% (80MHz), but enables two or more 
// (threads) in the core. The threads work in symmetrical way, which means
// contexts (threads) in the core. The threads work in symmetrical way, 
// that they will start with the same exactly core parameters (same initial
// which means that they will start with the same exactly core parameters 
// PC, same initial SP, etc). The boot.s code is designed to handle this
// (same initial PC, same initial SP, etc). The boot.s code is designed 
// difference and set each thread to different applications.
// to handle this difference and set each thread to different 
 
// applications.
// Notes: 
// Notes: 
// a) threading is currently supported only in the 3-stage pipeline version.
// a) threading is currently supported only in the 3-stage pipeline version.
// b) the old experimental "interrupt mode" was removed, which means that
// b) the old experimental "interrupt mode" was removed, which means that
//    the multi-thread mode does not make anything "visible" other than
//    the multi-thread mode does not make anything "visible" other than
//    increment the gpio register.
//    increment the gpio register.
// c) the threading in the non interrupt mode just shares the core 50%/50%,
// c) the threading in the non-interrupt mode switches when the program flow
//    in a way that the single-thread performance is reduced.
//    changes, i.e. every jal instruction. When the core is idle, it is 
 
//    probably in a jal loop.
 
 
//`define __THREADING__
//`define __THREADING__
 
 
 
// number of threads: between 2 and n. Of course, it requires more and 
 
// more FPGA space in order to implement it, depending of the FPGA technology. 
 
 
 
`define NTHREADS 4
 
 
// performance measurement:
// performance measurement:
//
//
// The performance measurement can be done in the simulation level by
// The performance measurement can be done in the simulation level by
// eabling the __PERFMETER__ define, in order to check how the clock cycles
// eabling the __PERFMETER__ define, in order to check how the clock cycles
// are used in the core. The report is displayed when the FINISH_REQ signal
// are used in the core. The report is displayed when the FINISH_REQ signal
Line 164... Line 171...
// .data.
// .data.
 
 
`define __RESETPC__ 32'd0
`define __RESETPC__ 32'd0
`define __RESETSP__ 32'd8192
`define __RESETSP__ 32'd8192
 
 
 
// UART queue: 
 
// 
 
// Optional RX/TX queue for communication oriented applications. The concept
 
// foreseen 256 bytes for TX and RX, in a way that frames up to 128 bytes can
 
// be easily exchanged via UART.
 
 
 
//`define __UARTQUEUE__
 
 
// board definition:
// board definition:
// 
// 
// The board is automatically defined in the xst/xise files via Makefile or
// The board is automatically defined in the xst/xise files via Makefile or
// ISE. Case it is not the case, please define you board name here:
// ISE. Case it is not the case, please define you board name here:
 
 
Line 255... Line 270...
 
 
`ifdef ALIEXPRESS_HPC40GBE_K420
`ifdef ALIEXPRESS_HPC40GBE_K420
    `define BOARD_ID 8
    `define BOARD_ID 8
    //`define BOARD_CK 200000000
    //`define BOARD_CK 200000000
    `define BOARD_CK_REF 100000000
    `define BOARD_CK_REF 100000000
    `define BOARD_CK_MUL 11
    `define BOARD_CK_MUL 12
    `define BOARD_CK_DIV 5
    `define BOARD_CK_DIV 5
    `define XILINX7CLK 1
    `define XILINX7CLK 1
    `define INVRES 1
    `define INVRES 1
`endif
`endif
 
 
Line 271... Line 286...
    `define XILINX7CLK 1
    `define XILINX7CLK 1
    `define VIVADO 1
    `define VIVADO 1
    `define INVRES 1
    `define INVRES 1
`endif
`endif
 
 
 
`ifdef ALIEXPRESS_HPC40GBE_XKCU040
 
    `define BOARD_ID 10
 
    //`define BOARD_CK 200000000
 
    `define BOARD_CK_REF 100000000
 
    `define BOARD_CK_MUL 8  // x8/2 = 400MHZ (overclock!)
 
    `define BOARD_CK_DIV 2  // vivado reco. = 250MHz
 
    `define XILINX7CLK 1
 
    `define INVRES 1
 
`endif
 
 
`ifndef BOARD_ID
`ifndef BOARD_ID
    `define BOARD_ID 0
    `define BOARD_ID 0
    `define BOARD_CK 100000000
    `define BOARD_CK 100000000
`endif
`endif
 
 
`ifdef BOARD_CK_REF
`ifdef BOARD_CK_REF
    `define BOARD_CK (`BOARD_CK_REF * `BOARD_CK_MUL / `BOARD_CK_DIV)
    `define BOARD_CK (`BOARD_CK_REF * `BOARD_CK_MUL / `BOARD_CK_DIV)
`endif
`endif
 
 
 
// the 3-stage pipeline is required when the threading mode is enabled,
 
// also, we need a non-null number of threads (default 2)
 
 
 
`ifdef __THREADING__
 
    `ifndef __3STAGE__
 
        `define __3STAGE__
 
    `endif
 
    `ifndef NTHREADS
 
        `define NTHREADS 2
 
    `endif
 
`endif
 
 
// darkuart baudrate automtically calculated according to board clock:
// darkuart baudrate automtically calculated according to board clock:
 
 
`ifndef __UARTSPEED__
`ifndef __UARTSPEED__
  `define __UARTSPEED__ 115200
  `define __UARTSPEED__ 115200
`endif
`endif

powered by: WebSVN 2.1.0

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