Skip to content

Commit

Permalink
Merge pull request #45 from stevehoover/master
Browse files Browse the repository at this point in the history
syncing with upstream
  • Loading branch information
vineetjain07 authored Aug 13, 2020
2 parents 9859dd5 + 84a0951 commit 7376483
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions warp-v.tlv
Original file line number Diff line number Diff line change
Expand Up @@ -954,7 +954,7 @@ m4+definitions(['
'])
\SV
m4_ifexpr(M4_CORE_CNT > 1, ['m4_include_lib(['https://raw.githubusercontent.com/stevehoover/tlv_flow_lib/4bcf06b71272556ec7e72269152561902474848e/pipeflow_lib.tlv'])'])
m4_ifelse(M4_ISA, ['RISCV'], ['m4_include_lib(['https://raw.githubusercontent.com/stevehoover/warp-v_includes/7e3109c23ea22e36bca8ae93faaa463037b40483/risc-v_defs.tlv'])'])
m4_ifelse(M4_ISA, ['RISCV'], ['m4_include_lib(['https://raw.githubusercontent.com/stevehoover/warp-v_includes/5100bc4424dd272ffd495dcb7d9653fb6b200e88/risc-v_defs.tlv'])'])
Expand Down Expand Up @@ -3294,17 +3294,18 @@ m4+definitions(['
$pkt_wr_blocked = $is_pkt_wr && |egress_in/skid_buffer>>1$push_blocked;
@1
$valid_pkt_wr = $is_pkt_wr && $commit;
$insert_header = |egress_in/skid_buffer$is_pkt_wr && ! $InPacket;
$valid_pkt_tail = $valid_pkt_wr && $is_csr_pkttail;
$insert_header = |egress_in/skid_buffer$valid_pkt_wr && ! $InPacket;
// Assert after inserting header up to insertion of tail.
$InPacket <= $insert_header || ($InPacket && ! (|egress_in/skid_buffer$is_csr_pkttail && ! |egress_in/skid_buffer$push_blocked));
$InPacket <= $insert_header || ($InPacket && ! (|egress_in/skid_buffer$valid_pkt_tail && ! |egress_in/skid_buffer$push_blocked));
@1

/skid_buffer
$ANY = >>1$push_blocked ? >>1$ANY : |egress_in/instr$ANY;
// Hold the write if blocked, including the write of the header in separate signals.
// This give 1 cycle of slop so we have time to check validity and generate a replay if blocked.
// Note that signals in this scope are captured versions reflecting the flit and its producing instruction.
$push_blocked = $valid_pkt_wr && (/_cpu/vc[$csr_pktwrvc]|egress_in$blocked || ! |egress_in/instr$InPacket);
$push_blocked = $valid_pkt_wr && (/_cpu/vc[$vc]|egress_in$blocked || ! |egress_in/instr$InPacket);
// Header
// Construct header flit.
$src[M4_CORE_INDEX_RANGE] = #m4_strip_prefix(/_cpu);
Expand All @@ -3314,8 +3315,9 @@ m4+definitions(['
$csr_pktdest[m4_echo(M4_CORE_INDEX_RANGE)]
};
/flit
// TODO. ADD a WHEN condition.
{$tail, $flit[M4_WORD_RANGE]} = |egress_in/instr$insert_header ? {1'b0, |egress_in/skid_buffer$header_flit} :
{|egress_in/skid_buffer$is_csr_pkttail, |egress_in/skid_buffer$csr_wr_value};
{|egress_in/skid_buffer$valid_pkt_tail, |egress_in/skid_buffer$csr_wr_value};
/vc[*]
|egress_in
@1
Expand Down
2 changes: 1 addition & 1 deletion warp-v_includes

0 comments on commit 7376483

Please sign in to comment.