mirror of
https://github.com/YosysHQ/yosys
synced 2026-07-03 22:16:09 +00:00
Remove trailing whitespaces
This commit is contained in:
parent
48a3dcc02a
commit
a689342207
317 changed files with 3136 additions and 3136 deletions
|
|
@ -1,7 +1,7 @@
|
|||
// ISC License
|
||||
//
|
||||
//
|
||||
// Copyright (C) 2024 Microchip Technology Inc. and its subsidiaries
|
||||
//
|
||||
//
|
||||
// Permission to use, copy, modify, and/or distribute this software for any
|
||||
// purpose with or without fee is hereby granted, provided that the above
|
||||
// copyright notice and this permission notice appear in all copies.
|
||||
|
|
@ -16,12 +16,12 @@
|
|||
|
||||
|
||||
// This file describes the main pattern matcher setup (of three total) that
|
||||
// forms the `microchip_dsp` pass described in microchip_dsp.cc
|
||||
// forms the `microchip_dsp` pass described in microchip_dsp.cc
|
||||
// At a high level, it works as follows:
|
||||
// ( 1) Starting from a DSP cell. Capture DSP configurations as states
|
||||
// ( 2) Match for pre-adder
|
||||
// ( 3) Match for post-adder
|
||||
// ( 4) Match register 'A', 'B', 'D', 'P'
|
||||
// ( 4) Match register 'A', 'B', 'D', 'P'
|
||||
// ( 5) If post-adder and PREG both present, check if PREG feeds into post-adder.
|
||||
// This indicates an accumulator situation like the ASCII diagram below:
|
||||
// +--------------------------------+
|
||||
|
|
@ -110,21 +110,21 @@ code bypassA bypassB bypassC bypassD bypassPASUB bypassP
|
|||
endcode
|
||||
|
||||
// (2) Match for pre-adder
|
||||
//
|
||||
//
|
||||
code sigA sigB sigD preAdderStatic moveBtoA
|
||||
subpattern(preAddMatching);
|
||||
preAdderStatic = u_preAdderStatic;
|
||||
moveBtoA = false;
|
||||
|
||||
if (preAdderStatic) {
|
||||
|
||||
|
||||
if (port(preAdderStatic, \Y) == sigA)
|
||||
{
|
||||
//used for packing
|
||||
moveBtoA = true;
|
||||
|
||||
// sigA should be the input to the multiplier without the preAdd. sigB and sigD should be
|
||||
//the preAdd inputs. If our "A" input into the multiplier is from the preAdd (not sigA), then
|
||||
// sigA should be the input to the multiplier without the preAdd. sigB and sigD should be
|
||||
//the preAdd inputs. If our "A" input into the multiplier is from the preAdd (not sigA), then
|
||||
// we basically swap it.
|
||||
sigA = sigB;
|
||||
}
|
||||
|
|
@ -144,7 +144,7 @@ code postAdderStatic sigP sigC
|
|||
|
||||
if (postAdderStatic) {
|
||||
//sigC will be whichever input to the postAdder that is NOT from the multiplier
|
||||
// u_postAddAB is the input to the postAdder from the multiplier
|
||||
// u_postAddAB is the input to the postAdder from the multiplier
|
||||
sigC = port(postAdderStatic, u_postAddAB == \A ? \B : \A);
|
||||
sigP = port(postAdderStatic, \Y);
|
||||
}
|
||||
|
|
@ -269,7 +269,7 @@ code
|
|||
if (postAdd)
|
||||
{
|
||||
if (postAdd->type.in($sub) && postAddAB == \A) {
|
||||
// if $sub, the multiplier output must match to $sub.B, otherwise no match
|
||||
// if $sub, the multiplier output must match to $sub.B, otherwise no match
|
||||
} else {
|
||||
u_postAddAB = postAddAB;
|
||||
u_postAdderStatic = postAdd;
|
||||
|
|
@ -286,11 +286,11 @@ endcode
|
|||
subpattern preAddMatching
|
||||
arg sigA sigB sigD bypassB bypassD bypassPASUB
|
||||
|
||||
code
|
||||
code
|
||||
u_preAdderStatic = nullptr;
|
||||
|
||||
// Ensure that preAdder not already used
|
||||
// Assume we can inspect port D to see if its all zeros.
|
||||
// Assume we can inspect port D to see if its all zeros.
|
||||
if (!(sigD.empty() || sigD.is_fully_zero())) reject;
|
||||
if (!bypassB.is_fully_ones()) reject;
|
||||
if (!bypassD.is_fully_ones()) reject;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue