Giter Site home page Giter Site logo

summer-summer / computerarchitecturelab Goto Github PK

View Code? Open in Web Editor NEW
33.0 33.0 13.0 28.98 MB

This repository is used to release the Labs of Computer Architecture Course from USTC

License: MIT License

Verilog 46.18% Assembly 39.32% C 9.45% Objective-C 0.28% Makefile 0.24% SystemVerilog 2.96% Python 1.57%

computerarchitecturelab's People

Contributors

ksqsf avatar summer-summer avatar theqihao avatar wangxuan95 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

computerarchitecturelab's Issues

lru可能会存在有些行载入cache之后永远不会被替换的bug

比如每次读写完成后地址都会首先变为00000(我所观察到的波形图都是如此),如果lru存在bug的话可能会误判断这是一次对地址00000的访问,这样会导致这一行永远不会被替换,也就不会写回到mem中。所以感觉flush掉cache的内容,然后在查看mem的内容是否全部正确是有必要的。

关于 Cache Lab 的 Bram 综合问题

根据 main_mem.sv,这里读 mem.sv 需要两个周期

if(rd_delay>=1 && rd_delay<1+LINE_SIZE) begin
mem_addr = {addr, rd_line_addr};
end
if(rd_delay>=3 && rd_delay<3+LINE_SIZE) begin
rd_line_latch[rd_out_line_addr] <= mem_rd_data;
end

根据 mem.sv,一个周期就能读出结果

always @ (posedge clk or posedge rst)
if(rst)
rd_data <= 0;
else
rd_data <= ram_cell[addr];

我正在尝试使用 Verilator 对 CPU 进行仿真,定位到这里的代码使我的仿真结果与预期不符,能否请问此处是代码的 bug,还是 Vivado 会自动综合出合理的 BRAM?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.