mirror of https://github.com/zachjs/sv2v.git
Compare commits
5 Commits
4afd4f64b9
...
1edaab8e7d
| Author | SHA1 | Date |
|---|---|---|
|
|
1edaab8e7d | |
|
|
96469b7bbd | |
|
|
d2428494fb | |
|
|
c1ce7d067b | |
|
|
60c0819bf4 |
|
|
@ -18,9 +18,9 @@ jobs:
|
|||
strategy:
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-22.04
|
||||
- macOS-13
|
||||
- windows-2022
|
||||
- ubuntu-24.04
|
||||
- macOS-15-intel
|
||||
- windows-2025
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
|
|
@ -45,8 +45,8 @@ jobs:
|
|||
strategy:
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-22.04
|
||||
- macOS-13
|
||||
- ubuntu-24.04
|
||||
- macOS-15-intel
|
||||
needs: build
|
||||
env:
|
||||
IVERILOG_REF: cbdaa865a10ce69d7c528cb2aa4c571641de0c62
|
||||
|
|
@ -104,7 +104,7 @@ jobs:
|
|||
release:
|
||||
permissions:
|
||||
contents: write
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-24.04
|
||||
strategy:
|
||||
matrix:
|
||||
name: [macOS, Linux, Windows]
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ on:
|
|||
- NOTICE
|
||||
jobs:
|
||||
notice:
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Regenerate NOTICE
|
||||
|
|
|
|||
|
|
@ -8,12 +8,13 @@ on:
|
|||
- cron: '0 0 * * 0'
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-24.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
resolver:
|
||||
- nightly
|
||||
- lts-24
|
||||
- lts-23
|
||||
- lts-22
|
||||
- lts-21
|
||||
|
|
|
|||
130
NOTICE
130
NOTICE
|
|
@ -1,5 +1,5 @@
|
|||
================================================================================
|
||||
Dependency: alex-3.5.3.0
|
||||
Dependency: alex-3.5.4.0
|
||||
================================================================================
|
||||
|
||||
Copyright (c) 1995-2011, Chris Dornan and Simon Marlow
|
||||
|
|
@ -34,7 +34,7 @@ Dependency: alex-3.5.3.0
|
|||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
================================================================================
|
||||
Dependency: ansi-terminal-1.1.2
|
||||
Dependency: ansi-terminal-1.1.3
|
||||
================================================================================
|
||||
|
||||
Copyright (c) 2008, Maximilian Bolingbroke
|
||||
|
|
@ -64,7 +64,7 @@ Dependency: ansi-terminal-1.1.2
|
|||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
================================================================================
|
||||
Dependency: ansi-terminal-types-1.1
|
||||
Dependency: ansi-terminal-types-1.1.3
|
||||
================================================================================
|
||||
|
||||
Copyright (c) 2008, Maximilian Bolingbroke
|
||||
|
|
@ -183,7 +183,7 @@ Dependency: array-0.5.8.0
|
|||
|
||||
|
||||
================================================================================
|
||||
Dependency: base-4.19.2.0
|
||||
Dependency: base-4.20.2.0
|
||||
================================================================================
|
||||
|
||||
This library (libraries/base) is derived from code from several
|
||||
|
|
@ -271,7 +271,7 @@ Dependency: base-4.19.2.0
|
|||
-----------------------------------------------------------------------------
|
||||
|
||||
================================================================================
|
||||
Dependency: binary-0.8.9.1
|
||||
Dependency: binary-0.8.9.3
|
||||
================================================================================
|
||||
|
||||
Copyright (c) Lennart Kolmodin
|
||||
|
|
@ -306,7 +306,7 @@ Dependency: binary-0.8.9.1
|
|||
POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
================================================================================
|
||||
Dependency: bytestring-0.12.1.0
|
||||
Dependency: bytestring-0.12.2.0
|
||||
================================================================================
|
||||
|
||||
Copyright (c) Don Stewart 2005-2009
|
||||
|
|
@ -402,7 +402,7 @@ Dependency: colour-2.3.6
|
|||
THE SOFTWARE.
|
||||
|
||||
================================================================================
|
||||
Dependency: containers-0.6.8
|
||||
Dependency: containers-0.7
|
||||
================================================================================
|
||||
|
||||
The Glasgow Haskell Compiler License
|
||||
|
|
@ -438,7 +438,7 @@ Dependency: containers-0.6.8
|
|||
DAMAGE.
|
||||
|
||||
================================================================================
|
||||
Dependency: deepseq-1.5.1.0
|
||||
Dependency: deepseq-1.5.0.0
|
||||
================================================================================
|
||||
|
||||
This library (deepseq) is derived from code from the GHC project which
|
||||
|
|
@ -550,7 +550,7 @@ Dependency: directory-1.3.8.5
|
|||
-----------------------------------------------------------------------------
|
||||
|
||||
================================================================================
|
||||
Dependency: exceptions-0.10.7
|
||||
Dependency: exceptions-0.10.9
|
||||
================================================================================
|
||||
|
||||
Copyright 2013-2015 Edward Kmett
|
||||
|
|
@ -586,7 +586,7 @@ Dependency: exceptions-0.10.7
|
|||
POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
================================================================================
|
||||
Dependency: filepath-1.4.301.0
|
||||
Dependency: filepath-1.5.4.0
|
||||
================================================================================
|
||||
|
||||
Copyright Neil Mitchell 2005-2020.
|
||||
|
|
@ -657,7 +657,95 @@ Dependency: ghc-bignum-1.3
|
|||
DAMAGE.
|
||||
|
||||
================================================================================
|
||||
Dependency: ghc-prim-0.11.0
|
||||
Dependency: ghc-internal-9.1003.0
|
||||
================================================================================
|
||||
|
||||
This library (libraries/base) is derived from code from several
|
||||
sources:
|
||||
|
||||
* Code from the GHC project which is largely (c) The University of
|
||||
Glasgow, and distributable under a BSD-style license (see below),
|
||||
|
||||
* Code from the Haskell 98 Report which is (c) Simon Peyton Jones
|
||||
and freely redistributable (but see the full license for
|
||||
restrictions).
|
||||
|
||||
* Code from the Haskell Foreign Function Interface specification,
|
||||
which is (c) Manuel M. T. Chakravarty and freely redistributable
|
||||
(but see the full license for restrictions).
|
||||
|
||||
The full text of these licenses is reproduced below. All of the
|
||||
licenses are BSD-style or compatible.
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
The Glasgow Haskell Compiler License
|
||||
|
||||
Copyright 2004, The University Court of the University of Glasgow.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
- Neither name of the University nor the names of its contributors may be
|
||||
used to endorse or promote products derived from this software without
|
||||
specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
|
||||
GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGE.
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
Code derived from the document "Report on the Programming Language
|
||||
Haskell 98", is distributed under the following license:
|
||||
|
||||
Copyright (c) 2002 Simon Peyton Jones
|
||||
|
||||
The authors intend this Report to belong to the entire Haskell
|
||||
community, and so we grant permission to copy and distribute it for
|
||||
any purpose, provided that it is reproduced in its entirety,
|
||||
including this Notice. Modified versions of this Report may also be
|
||||
copied and distributed for any purpose, provided that the modified
|
||||
version is clearly presented as such, and that it does not claim to
|
||||
be a definition of the Haskell 98 Language.
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
Code derived from the document "The Haskell 98 Foreign Function
|
||||
Interface, An Addendum to the Haskell 98 Report" is distributed under
|
||||
the following license:
|
||||
|
||||
Copyright (c) 2002 Manuel M. T. Chakravarty
|
||||
|
||||
The authors intend this Report to belong to the entire Haskell
|
||||
community, and so we grant permission to copy and distribute it for
|
||||
any purpose, provided that it is reproduced in its entirety,
|
||||
including this Notice. Modified versions of this Report may also be
|
||||
copied and distributed for any purpose, provided that the modified
|
||||
version is clearly presented as such, and that it does not claim to
|
||||
be a definition of the Haskell 98 Foreign Function Interface.
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
================================================================================
|
||||
Dependency: ghc-prim-0.12.0
|
||||
================================================================================
|
||||
|
||||
This library (libraries/ghc-prim) is derived from code from several
|
||||
|
|
@ -756,7 +844,7 @@ Dependency: githash-0.1.7.0
|
|||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
================================================================================
|
||||
Dependency: happy-2.0.2
|
||||
Dependency: happy-2.1.7
|
||||
================================================================================
|
||||
|
||||
The Happy License
|
||||
|
|
@ -791,13 +879,13 @@ Dependency: happy-2.0.2
|
|||
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
================================================================================
|
||||
Dependency: happy-lib-2.0.2
|
||||
Dependency: happy-lib-2.1.7
|
||||
================================================================================
|
||||
|
||||
Page not found: Sorry, it's just not here.
|
||||
|
||||
================================================================================
|
||||
Dependency: hashable-1.4.7.0
|
||||
Dependency: hashable-1.5.0.0
|
||||
================================================================================
|
||||
|
||||
Copyright Milan Straka 2010
|
||||
|
|
@ -1029,7 +1117,7 @@ Dependency: primitive-0.9.1.0
|
|||
|
||||
|
||||
================================================================================
|
||||
Dependency: process-1.6.25.0
|
||||
Dependency: process-1.6.26.1
|
||||
================================================================================
|
||||
|
||||
This library (libraries/process) is derived from code from two
|
||||
|
|
@ -1165,7 +1253,7 @@ Dependency: random-1.2.1.3
|
|||
-----------------------------------------------------------------------------
|
||||
|
||||
================================================================================
|
||||
Dependency: splitmix-0.1.1
|
||||
Dependency: splitmix-0.1.3.1
|
||||
================================================================================
|
||||
|
||||
Copyright (c) 2017, Oleg Grenrus
|
||||
|
|
@ -1236,7 +1324,7 @@ Dependency: stm-2.5.3.1
|
|||
DAMAGE.
|
||||
|
||||
================================================================================
|
||||
Dependency: tagged-0.8.8
|
||||
Dependency: tagged-0.8.9
|
||||
================================================================================
|
||||
|
||||
Copyright (c) 2009-2015 Edward Kmett
|
||||
|
|
@ -1295,7 +1383,7 @@ Dependency: tasty-1.5.3
|
|||
THE SOFTWARE.
|
||||
|
||||
================================================================================
|
||||
Dependency: template-haskell-2.21.0.0
|
||||
Dependency: template-haskell-2.22.0.0
|
||||
================================================================================
|
||||
|
||||
|
||||
|
|
@ -1333,7 +1421,7 @@ Dependency: template-haskell-2.21.0.0
|
|||
|
||||
|
||||
================================================================================
|
||||
Dependency: text-2.1.1
|
||||
Dependency: text-2.1.3
|
||||
================================================================================
|
||||
|
||||
Copyright (c) 2008-2009, Tom Harper
|
||||
|
|
@ -1414,7 +1502,7 @@ Dependency: time-1.12.2
|
|||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
================================================================================
|
||||
Dependency: transformers-0.6.1.0
|
||||
Dependency: transformers-0.6.1.1
|
||||
================================================================================
|
||||
|
||||
The Glasgow Haskell Compiler License
|
||||
|
|
@ -1485,7 +1573,7 @@ Dependency: transformers-compat-0.7.2
|
|||
POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
================================================================================
|
||||
Dependency: unix-2.8.6.0
|
||||
Dependency: unix-2.8.7.0
|
||||
================================================================================
|
||||
|
||||
The Glasgow Haskell Compiler License
|
||||
|
|
|
|||
|
|
@ -114,24 +114,42 @@ instance Show AlwaysKW where
|
|||
|
||||
data NInputGateKW
|
||||
= GateAnd
|
||||
| GateBufif0
|
||||
| GateNand
|
||||
| GateOr
|
||||
| GateNor
|
||||
| GateRpmos
|
||||
| GateXor
|
||||
| GateXnor
|
||||
| GateBufif0
|
||||
| GateBufif1
|
||||
| GateNotif0
|
||||
| GateNotif1
|
||||
| GateCmos
|
||||
| GateRcmos
|
||||
| GateNmos
|
||||
| GatePmos
|
||||
| GateRnmos
|
||||
| GateRpmos
|
||||
deriving Eq
|
||||
|
||||
instance Show NInputGateKW where
|
||||
show GateAnd = "and"
|
||||
show GateBufif0 = "bufif0"
|
||||
show GateNand = "nand"
|
||||
show GateOr = "or"
|
||||
show GateNor = "nor"
|
||||
show GateRpmos = "rpmos"
|
||||
show GateXor = "xor"
|
||||
show GateXnor = "xnor"
|
||||
show GateBufif0 = "bufif0"
|
||||
show GateBufif1 = "bufif1"
|
||||
show GateNotif0 = "notif0"
|
||||
show GateNotif1 = "notif1"
|
||||
-- these technically require exactly 3 inputs: input, ncontrol, pcontrol
|
||||
show GateCmos = "cmos"
|
||||
show GateRcmos = "rcmos"
|
||||
-- these technically require exactly 2 inputs: input, enable
|
||||
show GateNmos = "nmos"
|
||||
show GatePmos = "pmos"
|
||||
show GateRnmos = "rnmos"
|
||||
show GateRpmos = "rpmos"
|
||||
|
||||
data NOutputGateKW
|
||||
= GateBuf
|
||||
|
|
|
|||
|
|
@ -509,6 +509,8 @@ postProcess stack (Token Id_escaped str pos : ts) =
|
|||
where
|
||||
t' = Token Id_escaped str' pos
|
||||
str' = (++ " ") $ init str
|
||||
postProcess _ (Token Unknown str pos : _) =
|
||||
throwError $ show pos ++ ": unknown token '" ++ str ++ "'"
|
||||
postProcess [] (t : ts) = do
|
||||
ts' <- postProcess [] ts
|
||||
return $ t : ts'
|
||||
|
|
|
|||
|
|
@ -873,13 +873,21 @@ OptGateName :: { (Identifier, [Range]) }
|
|||
|
||||
NInputGateKW :: { NInputGateKW }
|
||||
: "and" { GateAnd }
|
||||
| "bufif0" { GateBufif0 }
|
||||
| "nand" { GateNand }
|
||||
| "or" { GateOr }
|
||||
| "nor" { GateNor }
|
||||
| "rpmos" { GateRpmos }
|
||||
| "xor" { GateXor }
|
||||
| "xnor" { GateXnor }
|
||||
| "bufif0" { GateBufif0 }
|
||||
| "bufif1" { GateBufif1 }
|
||||
| "notif0" { GateNotif0 }
|
||||
| "notif1" { GateNotif1 }
|
||||
| "cmos" { GateCmos }
|
||||
| "rcmos" { GateRcmos }
|
||||
| "nmos" { GateNmos }
|
||||
| "pmos" { GatePmos }
|
||||
| "rnmos" { GateRnmos }
|
||||
| "rpmos" { GateRpmos }
|
||||
NOutputGateKW :: { NOutputGateKW }
|
||||
: "buf" { GateBuf }
|
||||
| "not" { GateNot }
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
resolver: lts-23.23
|
||||
resolver: lts-24.18
|
||||
pvp-bounds: upper
|
||||
ghc-options:
|
||||
$locals: -j2
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
packages: []
|
||||
snapshots:
|
||||
- completed:
|
||||
sha256: 5e44cb81460cd2f90011ab6868958d58bde10f63babf4847a56118450b51221e
|
||||
size: 683836
|
||||
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/23/23.yaml
|
||||
original: lts-23.23
|
||||
sha256: 4cb7085bcc4e7d0b58a523df16a25201800a076f643445ec4f8bb78a94be652f
|
||||
size: 726109
|
||||
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/24/18.yaml
|
||||
original: lts-24.18
|
||||
|
|
|
|||
|
|
@ -1,19 +1,29 @@
|
|||
module top;
|
||||
reg input_a;
|
||||
reg input_b;
|
||||
|
||||
wire output_and;
|
||||
wire output_and_delay;
|
||||
wire output_not;
|
||||
wire output_buf_delay;
|
||||
wire output_bufif0_delay;
|
||||
wire output_rpmos;
|
||||
reg input_a, input_b, input_c;
|
||||
|
||||
wire output_and, output_and_delay;
|
||||
wire output_not, output_buf_delay;
|
||||
and (output_and, input_a, input_b);
|
||||
and #1 (output_and_delay, input_a, input_b);
|
||||
not (output_not, input_a);
|
||||
buf #2 foo_name (output_buf_delay, input_a);
|
||||
|
||||
wire output_bufif0_delay, output_bufif1_delay;
|
||||
wire output_notif0_delay, output_notif1_delay;
|
||||
bufif0 (output_bufif0_delay, input_a, input_b);
|
||||
bufif1 (output_bufif1_delay, input_a, input_b);
|
||||
notif0 (output_notif0_delay, input_a, input_b);
|
||||
notif1 (output_notif1_delay, input_a, input_b);
|
||||
|
||||
wire output_cmos, output_rcmos;
|
||||
cmos (output_cmos, input_a, input_b, input_c);
|
||||
rcmos (output_rcmos, input_a, input_b, input_c);
|
||||
|
||||
wire output_nmos, output_pmos;
|
||||
wire output_rnmos, output_rpmos;
|
||||
nmos (output_nmos, input_a, input_b);
|
||||
pmos (output_pmos, input_a, input_b);
|
||||
rnmos (output_rnmos, input_a, input_b);
|
||||
rpmos (output_rpmos, input_a, input_b);
|
||||
|
||||
wire output_nand, output_or, output_nor, output_xor, output_xnor;
|
||||
|
|
@ -27,21 +37,30 @@ module top;
|
|||
$monitor("%3d ", $time,
|
||||
input_a, input_b,
|
||||
output_and, output_and_delay,
|
||||
output_not, output_buf_delay, output_bufif0_delay,
|
||||
output_not, output_buf_delay,
|
||||
output_bufif0_delay, output_bufif1_delay,
|
||||
output_notif0_delay, output_notif1_delay,
|
||||
output_cmos, output_rcmos,
|
||||
output_nmos, output_pmos,
|
||||
output_rnmos, output_rpmos,
|
||||
output_nand, output_or, output_nor, output_xor, output_xnor);
|
||||
|
||||
#1;
|
||||
#1; input_a = 1;
|
||||
#1; input_c = 0;
|
||||
#1; input_b = 0;
|
||||
#1; input_b = 1;
|
||||
#1; input_c = 1;
|
||||
#1;
|
||||
|
||||
#1; input_a = 0;
|
||||
#1; input_b = 0;
|
||||
#1; input_a = 0;
|
||||
#1; input_b = 1;
|
||||
#1; input_c = 0;
|
||||
#1; input_a = 1;
|
||||
#1; input_b = 0;
|
||||
#1; input_c = 1;
|
||||
#1; input_a = 1;
|
||||
#1; input_b = 1;
|
||||
#1;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
// pattern: Parse error: unexpected token '`'
|
||||
// pattern: unknown token '`'
|
||||
// location: double_backtick.sv:4:5
|
||||
module top;
|
||||
``
|
||||
endmodule
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
// pattern: Parse error
|
||||
// pattern: unknown token '`'
|
||||
// location: stray_escaped_vendor_comment.sv:4:6
|
||||
module top;
|
||||
/``* some awful garbage *``/
|
||||
endmodule
|
||||
|
|
|
|||
Loading…
Reference in New Issue