新聞中心

        EEPW首頁 > 嵌入式系統 > 設計應用 > 如何在SoC設計中使用事務處理(二)

        如何在SoC設計中使用事務處理(二)

        作者: 時間:2012-08-01 來源:網絡 收藏

        建模、驗證與調試需要統一標準的符號和框架,以便使架構師和工程師能夠協同進行復雜的開發。級模型(TLM)是進行這種分析的理想模型,在片上系統()級建模,可讓從高效率協同仿真和高產出的分析與調試中受益。

        本文引用地址:http://www.104case.com/article/148679.htm

        下面是對圖2所示的進行建模的一個簡單代碼段。這個類的旨在于將事務處理數據記錄到作為trans_db instance dump_file類的事務處理數據庫中。輸出被顯示在圖3最右部分。

        // Inside program or some other OpenVera context

        trans_db dump_file;

        trans_stream stream1;

        trans_type mem_read;

        trans_handle h1;

        // open a database file

        dump_file=new(test);

        // create the memory stream under the test.duv.bus scope

        stream1=new(dump_file, test.duv.bus, memory);

        // create the read transaction type in the memory stream

        mem_read=new(stream1, Read);

        // define 2 attributes in the read transaction type

        mem_read.create_attr(Addr, INTEGER_DT);

        mem_read.create_attr(Data, INTEGER_DT);

        delay(10);

        // begin a memory read transaction at 10

        h1=mem_read.begin_now();

        h1.log_integer_attr(Addr, 170);

        h1.log_integer_attr(Data, 123);

        delay(20);

        // end h1 transaction at 20

        h1.end_now();

        // close the database file

        dump_file.close();


        上一頁 1 2 下一頁

        評論


        相關推薦

        技術專區

        關閉
        主站蜘蛛池模板: 铁力市| 康平县| 沂南县| 荥阳市| 谷城县| 揭东县| 高碑店市| 永靖县| 临泉县| 神池县| 铁力市| 醴陵市| 海丰县| 和平区| 吉木乃县| 广平县| 平安县| 天祝| 双桥区| 潮安县| 商河县| 舒兰市| 崇明县| 梨树县| 类乌齐县| 当雄县| 平江县| 兴化市| 泾阳县| 恩平市| 安达市| 六盘水市| 岱山县| 元朗区| 阜阳市| 南召县| 老河口市| 贡觉县| 吴旗县| 榆林市| 安平县|