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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [orpsocv2/] [bench/] [sysc/] [src/] [OrpsocMain.cpp] - Diff between revs 354 and 362

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 354 Rev 362
Line 67... Line 67...
  sc_clock             clk ("clk", clkPeriod);
  sc_clock             clk ("clk", clkPeriod);
  sc_clock  jtag_tck ("jtag-clk", jtagPeriod, 0.5, SC_ZERO_TIME, false);
  sc_clock  jtag_tck ("jtag-clk", jtagPeriod, 0.5, SC_ZERO_TIME, false);
 
 
  sc_signal<bool>      rst;
  sc_signal<bool>      rst;
  sc_signal<bool>      rstn;
  sc_signal<bool>      rstn;
  sc_signal<bool>      rst_o;
 
 
 
  sc_signal<bool>      jtag_tdi;                // JTAG interface
  sc_signal<bool>      jtag_tdi;                // JTAG interface
  sc_signal<bool>      jtag_tdo;
  sc_signal<bool>      jtag_tdo;
  sc_signal<bool>      jtag_tms;
  sc_signal<bool>      jtag_tms;
  sc_signal<bool>      jtag_trst;
  sc_signal<bool>      jtag_trst;
 
 
  sc_signal<bool>      uart_rx;         // External UART
  sc_signal<bool>      uart_rx;         // External UART
  sc_signal<bool>      uart_tx;
  sc_signal<bool>      uart_tx;
 
 
  sc_signal<bool> spi_sd_sclk; // SD Card Memory SPI
 
  sc_signal<bool> spi_sd_ss;
 
  sc_signal<bool> spi_sd_miso;
 
  sc_signal<bool> spi_sd_mosi;
 
 
 
  sc_signal<uint32_t> gpio_a; // GPIO bus - output only in verilator sims
 
 
 
  sc_signal<bool> spi1_mosi;
 
  sc_signal<bool> spi1_miso;
 
  sc_signal<bool> spi1_ss;
 
  sc_signal<bool> spi1_sclk;
 
 
 
  SIM_RUNNING = 0;
  SIM_RUNNING = 0;
 
 
  // Setup the name of the VCD dump file
  // Setup the name of the VCD dump file
  bool VCD_enabled = false;
  bool VCD_enabled = false;
  string dumpNameDefault("vlt-dump.vcd");
  string dumpNameDefault("vlt-dump.vcd");
Line 272... Line 259...
  else
  else
      gdbServer = NULL;
      gdbServer = NULL;
 
 
  // Connect up ORPSoC
  // Connect up ORPSoC
  orpsoc->clk_pad_i (clk);
  orpsoc->clk_pad_i (clk);
  orpsoc->rst_pad_i (rstn);
  orpsoc->rst_n_pad_i (rstn);
  orpsoc->rst_pad_o (rst_o);
 
 
 
  orpsoc->dbg_tck_pad_i  (jtag_tck);            // JTAG interface
  orpsoc->tck_pad_i  (jtag_tck);                // JTAG interface
  orpsoc->dbg_tdi_pad_i  (jtag_tdi);
  orpsoc->tdi_pad_i  (jtag_tdi);
  orpsoc->dbg_tms_pad_i  (jtag_tms);
  orpsoc->tms_pad_i  (jtag_tms);
  orpsoc->dbg_tdo_pad_o  (jtag_tdo);
  orpsoc->tdo_pad_o  (jtag_tdo);
 
 
  orpsoc->uart0_srx_pad_i (uart_rx);            // External UART
  orpsoc->uart0_srx_pad_i (uart_rx);            // External UART
  orpsoc->uart0_stx_pad_o (uart_tx);
  orpsoc->uart0_stx_pad_o (uart_tx);
 
 
  orpsoc->spi_sd_sclk_pad_o (spi_sd_sclk); // SD Card Memory SPI
 
  orpsoc->spi_sd_ss_pad_o (spi_sd_ss);
 
  orpsoc->spi_sd_miso_pad_i (spi_sd_miso);
 
  orpsoc->spi_sd_mosi_pad_o (spi_sd_mosi);
 
 
 
  orpsoc->spi1_mosi_pad_o (spi1_mosi);
 
  orpsoc->spi1_miso_pad_i (spi1_miso);
 
  orpsoc->spi1_ss_pad_o  (spi1_ss);
 
  orpsoc->spi1_sclk_pad_o (spi1_sclk);
 
 
 
 
 
  orpsoc->gpio_a_pad_io (gpio_a); // GPIO bus - output only in 
 
                                  // verilator sims
 
 
 
  // Connect up the SystemC  modules
  // Connect up the SystemC  modules
  reset->clk (clk);                     // Reset
  reset->clk (clk);                     // Reset
  reset->rst (rst);
  reset->rst (rst);
  reset->rstn (rstn);
  reset->rstn (rstn);
 
 
Line 319... Line 291...
 
 
  // Tie off signals
  // Tie off signals
  jtag_tdi      = 1;                    // Tie off the JTAG inputs
  jtag_tdi      = 1;                    // Tie off the JTAG inputs
  jtag_tms      = 1;
  jtag_tms      = 1;
 
 
  spi_sd_miso = 0; // Tie off master-in/slave-out of SD SPI bus
 
 
 
  spi1_miso = 0;
 
 
 
 
 
  if (VCD_enabled)
  if (VCD_enabled)
    {
    {
      Verilated::traceEverOn (true);
      Verilated::traceEverOn (true);
 
 
      printf("* VCD dumpfile: %s\n", vcdDumpFile.c_str());
      printf("* VCD dumpfile: %s\n", vcdDumpFile.c_str());

powered by: WebSVN 2.1.0

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