google / CFU-Playground

Want a faster ML processor? Do it yourself! -- A framework for playing with custom opcodes to accelerate TensorFlow Lite for Microcontrollers (TFLM). . . . . . Online tutorial: https://google.github.io/CFU-Playground/ For reference docs, see the link below.
http://cfu-playground.rtfd.io/
Apache License 2.0
452 stars 116 forks source link

Issue in synthesis for large design #796

Closed bala122 closed 1 year ago

bala122 commented 1 year ago

Hi @tcal-x and @alanvgreen , Im trying to synthesize and run a large cfu design with multiple compute units and am having an issue where it is hanging at a very basic cfu store command. So, this is the interface Im using:

    //Multi cycle Interface handshaking
    if(func_id_full[2:0] == 3'b111) begin
      rsp_valid = rsp_valid_sig;
      cmd_ready = ~rsp_valid_sig;
    end
    else begin

      rsp_valid = rsp_valid_sig;
      cmd_ready = 0;
    end

Im seeing that the whole thing hangs at line 289 in conv.h, corresponding to the first cfu_op0 command. Ive looked at the trace and seen that the rsp_valid_sig register (combinationally connected to rsp_valid) is

not being enabled on the cfu's end however, Ive confirmed that in the cfu.v file rsp_valid_sig is being flipped to 1 when it receives the cfu_op0 command as you can see in line 356 in cfu.v. This is baffling and Im not sure how to write it correctly for synthesis. Could you give me suggestions on the cfu.v file?

Screenshot from 2023-05-05 19-07-05 debug_dir.zip

I've attached a debug dir with all relevant files including the cfu as well. Please let me know about this as soon as you can, I have to do this within a deadline. Thanks for the help in advance. Thanks, Bala.

bala122 commented 1 year ago

Ill try to send an updated version soon of cfu.v

bala122 commented 1 year ago

Hi, please never mind this, the issue is resolved. I had used the waveform to check issues with my interface. Thanks, Bala.