Giter VIP home page Giter VIP logo

fpga_mafia's People

Contributors

amichai-bd avatar danielk532 avatar jacobavitan837 avatar noamrahat avatar noamsabb avatar roman012285 avatar shmuelsfez avatar yeonatanperelman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

fpga_mafia's Issues

subbmit the דוח מכין for review by Amichai

  • What are the IPs you are going to design
  • what role they have in the system,
  • architecture, microarchitecture, simulation, verification
  • FPGA
  • Integration to the MEGA_PROJECT

Break the tasks into milestones (according to dependency)

Add a cache directory under the source directory

Add a directory called "cache" under the "source" directory.
In the directory add a file called "README.md"
In the file, please write a short description of the project you are starting as you understand it. (1-3 paragraphs)

big_core - integrate the uart tile.

Using the "host" (personal computer) python terminal allows communication with the "device".
Load programs & data to the FPGA using the UART

router - create a round robin

welcome to use reference:

module round_robin
import utils_pkg::*;
(
    input   logic                         clk,
    input   logic                         rst,
    input   logic                         enable,
    input   logic [NUM_TQ_ENTRY-1:0]      candidates,
    output  logic [NUM_TQ_ENTRY_LOG2-1:0] enc_winner

);
logic [NUM_TQ_ENTRY-1:0] cur_winner;
logic [NUM_TQ_ENTRY-1:0] last_winner;
logic [NUM_TQ_ENTRY-1:0]      mask_out;
logic [NUM_TQ_ENTRY-1:0]      mask_candidate;
logic [NUM_TQ_ENTRY-1:0]      first_top;
logic [NUM_TQ_ENTRY-1:0]      first_bottom;
logic hit_top;
`LU_RST_EN_DFF(last_winner , cur_winner , clk, enable, rst)

always_comb begin
        mask_out = '0;
    for(int i =0; i < NUM_TQ_ENTRY; i++ )begin
        mask_out[i] = (last_winner > i);
    end
end
assign mask_candidate = (candidates & (~mask_out));
`FIND_FIRST(first_top    , mask_candidate)
`FIND_FIRST(first_bottom , candidates)

assign hit_top = (|first_top);
assign cur_winner = hit_top ? first_top : first_bottom;
`ENCODER(enc_winner, cur_winner)

//====================
// winner[1:0]       = 2'b10  ;
// mask_out[3:0]     = 4'b0011;
// candidate[3:0]    = 4'b1101;
// first_top[3:0]    = 4'b0100;
// first_bottom[3:0] = 4'b0001;
endmodule

big_core - "memory wrap"

Create something similar to the RVC_ASAP memory wrap

Make sure to solve the 32 bit alien access withing the mem_wrap and NOT in the big_core module
Create a ditectaed test to check all the memory access lw, lh, lb, lhu,,lbu, sw,sh,sb

Cache - Document the behavier of the merg_buffer & the Merge_buffer State in the HAS

Explain the cases of WR after Wr to the same CL
Explain Rd After WR to same CACHE line with word miss (HIT MB + MISS WORD)
Explain Rd After WR to same CACHE line with word HIT ( HIT MB + HIT WORD)(response from MB and not the Pipe)

How the fill is used for both WR miss fill & Read

How the RD miss will stall the Core.
How the MB merges the Writes & the Fills

How the FIll with a "rd_indication" will go through the pipe to answer and send the rd response in q3.

How do we never allocate a new entry for the request to the same CL.

  • In case of hit in "FILL_LU" the RD/WR request will 100% hit the Cache, no need to allocate a new TQ entry

The MB is a structure that works per TQ entry.

make github account

  • Daniel, Shmuel, Yonatan Open Git hub account
  • Amichai - will need to add you to the repository as contributors

Please mark this as done once you are all able to access this reposetory

cache Fix up the cache trackers

  1. add the description of the transaction as a header and not in line.
  2. add a tracker to both the pipe input & the pipe output. (q1 & q3)
  3. change the name the top level tracker to something more representative (cache_top_trk.log)
  4. add to the top level tracker the FM fill.
  5. support pipe tracker "Fill" opcodes

router - create the fifo_arbiter module

  1. create a simple description of the fifo_arbiter IO
  2. desgin the module
  3. use the FIFO you created and have 3 institutions in the fifo_arbiter
  4. using the round-robin, arbitrate the FIFO.
  5. Don't forget to have the "full" indication to back preasue

mini_core - Create a "build/mini_core_build.py"

Has 3 flags:

  • -app | compile the RISCV SW into SV executables
  • -hw | compile the RISCV HW into simulation
  • -sim | start simulation
    • Choose which test to run - plus+args to point to the correct 'memory' that was generated

Make sure the trk.log files get the unique directory of the specific test

cache - pipe feature 0.1

  1. Add a struct that is called cache_pipe_struct add the fields:
    For now, lets not optimize anything - just add any information on the transaction life-cycle into the pipe struct
  • lu_valid,
  • lu_set,
  • lu_tag,
  • hit,
  • miss,
  • mb_hit_cancel
  • set_ways_mru[3:0],
  • set_ways_valid[3:0],
  • set_ways_victim[3:0]
  • set_ways_hit[3:0],
  • set_ways_enc_hit[2:0],
  • fill_cl_data[127:0]
  • fill_valid
  • lu_opcode[1:0] // RD_LU, WR_LU, FILL_LU

Each cycle has the sampled version and the updated version ( cache_pipe_lu_q2 ,pre_cache_pipe_lu_q2)

//====================
//    Pipe stage 1
//====================
always_comb begin
  cache_pipe_lu_q1 ='0; //this is the default value
  cache_pipe_lu_q1.valid         = ...q1 ;
  cache_pipe_lu_q1.opcode    = ...q1 ;
  cache_pipe_lu_q1.set            =  ...q1 ;
  cache_pipe_lu_q1.tag           =  ...q1 ;
  cache_pipe_lu_q1.fill_data     =  ...q1 ;
end //always_comb


//====================
//    Pipe stage 2
//====================
`DFF(pre_cache_pipe_lu_q2, cache_pipe_lu_q1, clk)
always_comb begin
  cache_pipe_lu_q2                         =pre_cache_pipe_lu_q2; //this is the default value
  cache_pipe_lu_q2.set_ways_valid = ...;
  cache_pipe_lu_q2.set_ways_tags = ...;
  cache_pipe_lu_q2.set_ways_mru  = ...;
  cache_pipe_lu_q2.set_ways_hit    = ...;
  cache_pipe_lu_q2.hit                    = ...;
  cache_pipe_lu_q2.miss                = ...;
  cache_pipe_lu_q2.data_array_address   = {pre_cache_pipe_lu_q2.set , pre_cache_pipe_lu_q2.set_ways_enc_hit};

end //always_comb

//====================
//    Pipe stage 3
//====================
`DFF(pre_cache_pipe_lu_q3, cache_pipe_lu_q2, clk)
always_comb begin
  cache_pipe_lu_q3                        =pre_cache_pipe_lu_q; //this is the default value
  .. 
end

Use the struct to replace the current logic in the cache_pipe.

logic [NUM_WAYS-1:0] way_tag_match_q2;
logic [WAY_WIDTH-1:0] way_tag_enc_match_q2;
logic                 valid_match;
logic [WAY_WIDTH-1:0] way_tag_enc_match_q3;

router - re-code the fifo & RR logic to the correct coding style

  1. use the macros
  2. Don't use an async reset
  3. Use mean-terms
  4. don't use reg/wire - only logic
  5. interface - make sure to declare the type explicitly
  6. remove all <TABS> from design!!!!!
  7. Use the Push/Pop terminology on the interface
  8. indentation!
  9. Explicit signal width. ('0 is also acceptable)

mini_core - "memory wrap"

step 1:
Create the i_mem + d_mem as you see here:
https://github.com/amichai-bd/riscv-multi-core-lotr/tree/master/source/gpc_4t/rtl

Add a new module called "mem_wrap" which holds 2 modules:

  • inst_mem
    • fabric : read/write
    • Core : read
  • data_mem
    • fabric : read/write
    • Core : read/write

Please make the standard interface to match the FPGA style - see reference here:
https://github.com/amichai-bd/riscv-multi-core-lotr/blob/master/source/gpc_4t/rtl/d_mem_wrap.sv

Please note: the FPGA std memory is only 32-bit aligned!
You must ensure any non-32-bit aligned request will read/write correctly!
This is done by shifting the data & enable it correctly!

big_core - Create a "build/big_core_build.py"

Has 3 flags:

-app | compile the RISCV SW into SV executables
-hw | compile the RISCV HW into simulation
-sim | start simulation

Choose which test to run - plus+args to point to the correct 'memory' that was generated. - Leave this for last.
Make sure the trk.log files get the unique directory of the specific test

Watch the 2 Presentations

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.