zoukankan      html  css  js  c++  java
  • Rocket

    https://mp.weixin.qq.com/s/MUK2K1WrhcyoEsOVwpgrlw

     

    简单介绍TestHarness的实现。

     

     

    1. 测试模块

     

    TestHarness是一个测试模块,直接继承自Module类:

     

    2. io

     

    测试模块向外输出一个测试是否成功的信号:

     

    3. 实例化ExampleRocketSystem

     

    待测设备(dut)即是一个ExampleRocketSystem:

    a. 使用LazyModule(...)包裹创建一个ExampleRocketSystem实例;

    b. 引用其lazy val module,根据diplomacy节点连接,生成其具体逻辑;

    c. 使用Module(...)包裹,收集构建信息;

     

    4. 连接各个输入输出接口

     

    a. 连接复位信号;

    b. dontTouch输入输出IO端口:

    c. 关闭中断输入:

    d. 连接AXI存储模拟模块:

    e. 关闭前端总线:

     

    tieoff定义如下:

    f. 连接调试模块:

     

    根据配置选择DMI抑或JTAG调试接口:

     

    5. 附录

     

    // See LICENSE.SiFive for license details.

     

    package freechips.rocketchip.system

     

    import Chisel._

    import freechips.rocketchip.config.Parameters

    import freechips.rocketchip.devices.debug.Debug

    import freechips.rocketchip.diplomacy.LazyModule

     

    class TestHarness()(implicit p: Parameters) extends Module {

    val io = new Bundle {

    val success = Bool(OUTPUT)

    }

     

    val dut = Module(LazyModule(new ExampleRocketSystem).module)

    dut.reset := reset | dut.debug.ndreset

     

    dut.dontTouchPorts()

    dut.tieOffInterrupts()

    dut.connectSimAXIMem()

    dut.connectSimAXIMMIO()

    dut.l2_frontend_bus_axi4.foreach(_.tieoff)

    Debug.connectDebug(dut.debug, clock, reset, io.success)

    }

     

     

  • 相关阅读:
    智慧出行--maas
    hystrix动态修改参数
    hystrix元素详解
    hystrix讲解:熔断降级隔离以及合并请求
    幂等性概念
    设计模式之Command
    Unity AssetBundle工作流
    unity share current game screen
    `Facebook.Unity.Settings' has already been imported error solution
    IOException: win32 io returned 267. Path:
  • 原文地址:https://www.cnblogs.com/wjcdx/p/13298467.html
Copyright © 2011-2022 走看看