Compare commits
295 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
614607c135 | |
|
|
dec4e939f4 | |
|
|
e367080276 | |
|
|
e4bede3c76 | |
|
|
812c1cedcb | |
|
|
67d39803e6 | |
|
|
55250457ed | |
|
|
29a8a4d052 | |
|
|
4a505546a1 | |
|
|
15689210c1 | |
|
|
e5482b89b1 | |
|
|
d376375020 | |
|
|
d15f24ff49 | |
|
|
2ff0be6bfd | |
|
|
e7233856c8 | |
|
|
9a7178fef0 | |
|
|
82350c4866 | |
|
|
4d07a8466c | |
|
|
0e3ac8685c | |
|
|
1d623a67d1 | |
|
|
a540a7a163 | |
|
|
9ec8f8e2dd | |
|
|
36a79568b7 | |
|
|
ee14022127 | |
|
|
0723d9a477 | |
|
|
f8069416f2 | |
|
|
c0cf842eb2 | |
|
|
20a34d33c6 | |
|
|
f870c755fa | |
|
|
3e0c298b25 | |
|
|
6844ed4194 | |
|
|
9880fb8d5e | |
|
|
e02a0bc2ec | |
|
|
abfb4e83bc | |
|
|
17ca0948f4 | |
|
|
f6848300b7 | |
|
|
06740d0dda | |
|
|
15277c9fa4 | |
|
|
ca5c6fc59f | |
|
|
2cef311be2 | |
|
|
ff0b4a3154 | |
|
|
2b67d9f754 | |
|
|
56c42dcf37 | |
|
|
c8568998af | |
|
|
8d4faf2744 | |
|
|
025cbcc81f | |
|
|
b6829ab504 | |
|
|
43817251f4 | |
|
|
0c7341be37 | |
|
|
21b0107bae | |
|
|
24743af7d5 | |
|
|
60a81493cd | |
|
|
bc6d421ff2 | |
|
|
e56c93a2be | |
|
|
98d10727f2 | |
|
|
50b477bc1f | |
|
|
5364f11d16 | |
|
|
dc66f2fe7e | |
|
|
e2ab464656 | |
|
|
d01efc910b | |
|
|
158d7b76f2 | |
|
|
823aa224db | |
|
|
5a99d0e449 | |
|
|
9bbdb0da0e | |
|
|
9bff2399df | |
|
|
f358b3fa8f | |
|
|
be298d1cca | |
|
|
89b2c8bd80 | |
|
|
7cffbf440d | |
|
|
a1c333ea6e | |
|
|
d5306085c5 | |
|
|
77fdcfd800 | |
|
|
d2a97663b9 | |
|
|
d246979d26 | |
|
|
55d78cf1a8 | |
|
|
78750c51d0 | |
|
|
0e7c62d579 | |
|
|
5311c0cd38 | |
|
|
8c7f8f3f7b | |
|
|
1babbc0c92 | |
|
|
e9bc3488fb | |
|
|
f472a77e3a | |
|
|
8c27786a27 | |
|
|
e31c441dbe | |
|
|
ff0b269ce9 | |
|
|
c53e4245b9 | |
|
|
3c7250eb51 | |
|
|
9fb607d98e | |
|
|
eaa7197602 | |
|
|
9004d10df4 | |
|
|
4e168a4d1f | |
|
|
e75b0d7968 | |
|
|
167a6bbcdb | |
|
|
a5bf5e145f | |
|
|
a615ee03e7 | |
|
|
bb8b05bb5d | |
|
|
7934ab9eeb | |
|
|
daadc38f18 | |
|
|
a5b9879ada | |
|
|
72833b9570 | |
|
|
449abb6bda | |
|
|
0637afd284 | |
|
|
c124abaa3e | |
|
|
03f1bbdd37 | |
|
|
e9d3fe4ea3 | |
|
|
10349287a0 | |
|
|
9bc86af284 | |
|
|
593a97bede | |
|
|
d5a16b31a1 | |
|
|
20a969bf38 | |
|
|
4b9675abd7 | |
|
|
8caa3af689 | |
|
|
6326c5b1ba | |
|
|
128c621e85 | |
|
|
f963322076 | |
|
|
de415b2f03 | |
|
|
5b512e4f1e | |
|
|
c5c0b09ef6 | |
|
|
aa3d804b72 | |
|
|
2fc9d27190 | |
|
|
1e6e69ee7f | |
|
|
c7530dbcc1 | |
|
|
e47160c6a8 | |
|
|
311c22e4de | |
|
|
2d3502f4b7 | |
|
|
e54b404700 | |
|
|
297dbe94c2 | |
|
|
7b2c050457 | |
|
|
6a6ff90197 | |
|
|
aafda65b99 | |
|
|
129a5c980f | |
|
|
da42011b97 | |
|
|
e35c857a24 | |
|
|
7e7d0ae94b | |
|
|
0d74d5b211 | |
|
|
2e50fb2f06 | |
|
|
8b861b4171 | |
|
|
ecb8a70bed | |
|
|
635bdd8eb8 | |
|
|
ab6a0e0799 | |
|
|
85c58d0a7a | |
|
|
cc86f69a89 | |
|
|
28e121c040 | |
|
|
02fa1a9978 | |
|
|
3495889112 | |
|
|
e7934d5e66 | |
|
|
86546b5960 | |
|
|
ca3a00a51a | |
|
|
e6cfb08dd6 | |
|
|
74491cfe9f | |
|
|
dea82c5a91 | |
|
|
8229ce1b49 | |
|
|
08479888b1 | |
|
|
46c0526dab | |
|
|
0f75156d37 | |
|
|
f8e9384689 | |
|
|
fb3be420b4 | |
|
|
eb45fb6eec | |
|
|
1f5c7c888a | |
|
|
3f0d02350f | |
|
|
0a6fa449de | |
|
|
eadb1d24ae | |
|
|
00325f3efb | |
|
|
b605f42a1e | |
|
|
9f3f35e451 | |
|
|
73cee3b3e0 | |
|
|
9ff4a42171 | |
|
|
84dc4ec99f | |
|
|
1751f4ed0b | |
|
|
96cea271ba | |
|
|
b8eac7fc19 | |
|
|
f9ab26b3d9 | |
|
|
208078838e | |
|
|
73ae5bd1db | |
|
|
5b62f32ad6 | |
|
|
a6ba0eef5e | |
|
|
d84f1b9843 | |
|
|
f1c71eff5c | |
|
|
5fac9fae4d | |
|
|
a042847b38 | |
|
|
2f1987bded | |
|
|
a1299f7ca8 | |
|
|
00bb35a0ce | |
|
|
9d3101fd19 | |
|
|
4014db47e0 | |
|
|
3e7135aabb | |
|
|
38a24e71b5 | |
|
|
214324db8c | |
|
|
6b1878c1b5 | |
|
|
1476f36ff3 | |
|
|
89740e6f0e | |
|
|
2449ee2054 | |
|
|
e4afd6dc25 | |
|
|
cdb9bc2c21 | |
|
|
a8eda65859 | |
|
|
33584ec6f1 | |
|
|
46a329f16f | |
|
|
49ee58c356 | |
|
|
5b51ed9aa5 | |
|
|
ba3f46722c | |
|
|
265272a962 | |
|
|
56afcb6e75 | |
|
|
a52bef20ed | |
|
|
f696064af1 | |
|
|
1ea5f72496 | |
|
|
377881b723 | |
|
|
bcc3a66657 | |
|
|
ea57b6dd9a | |
|
|
ba74c7b5ad | |
|
|
fb6dfebcec | |
|
|
13d5155e88 | |
|
|
fde4ef85c1 | |
|
|
8c7f3452c5 | |
|
|
5240790480 | |
|
|
417ab54445 | |
|
|
2228e31a6a | |
|
|
39072cd452 | |
|
|
c963809709 | |
|
|
71ce460caa | |
|
|
e212ea1a1c | |
|
|
3d8f906bdd | |
|
|
3986804264 | |
|
|
e0e4a2af48 | |
|
|
81222402c7 | |
|
|
c2b63e69a4 | |
|
|
48242818b3 | |
|
|
e4c4247266 | |
|
|
d8e7cd4037 | |
|
|
f559a05672 | |
|
|
99c7a9f940 | |
|
|
33a6d58258 | |
|
|
6ffb4b9a3a | |
|
|
e9cffe506b | |
|
|
e02eb2a4d8 | |
|
|
68244563ca | |
|
|
0f454ff548 | |
|
|
cf53479ba2 | |
|
|
41c3423209 | |
|
|
f8e20f5a09 | |
|
|
d59e2c97ba | |
|
|
272cf91eae | |
|
|
8519a30354 | |
|
|
d39e81e1d1 | |
|
|
be3be03fec | |
|
|
11c619e265 | |
|
|
181cb7b2ed | |
|
|
9b42bf0df6 | |
|
|
0846198602 | |
|
|
6c52271afa | |
|
|
ed7240b392 | |
|
|
c14c73dd9a | |
|
|
03cac78504 | |
|
|
49eaafe886 | |
|
|
731891b58f | |
|
|
92d345ddb2 | |
|
|
10b5f70e71 | |
|
|
68f461f5a9 | |
|
|
6f3beca5fb | |
|
|
15989f3d62 | |
|
|
db06b37243 | |
|
|
047974bdb6 | |
|
|
e8a4cc7c9e | |
|
|
804e06cce9 | |
|
|
ca756322a7 | |
|
|
eed88fc61f | |
|
|
9b0d46b4bf | |
|
|
1248394a5d | |
|
|
fa518a3409 | |
|
|
aa417d7575 | |
|
|
f20865a5ea | |
|
|
ac3ef217c3 | |
|
|
6767a07956 | |
|
|
42d0c3fd4a | |
|
|
5da8894590 | |
|
|
4c315b32d4 | |
|
|
dc0d162fa9 | |
|
|
29e128ed94 | |
|
|
475f098cab | |
|
|
7d438b66c8 | |
|
|
54f17a2cb1 | |
|
|
42f7d3a922 | |
|
|
1f8991e382 | |
|
|
ab74cafa20 | |
|
|
ff2f4c6864 | |
|
|
d3bda52d69 | |
|
|
d64bf0b0b3 | |
|
|
c836236b28 | |
|
|
462a15dcbb | |
|
|
57385f9ac6 | |
|
|
f9a0542a49 | |
|
|
14a25bfe92 | |
|
|
4dfac864ce | |
|
|
3f936d2d8b | |
|
|
b8de0499a9 | |
|
|
98391b56bc |
|
|
@ -1,20 +0,0 @@
|
||||||
#!/usr/bin/env sh
|
|
||||||
|
|
||||||
echo "Using the bundled ivtest to run regression tests."
|
|
||||||
echo " pwd = $(pwd)"
|
|
||||||
|
|
||||||
cd ivtest
|
|
||||||
|
|
||||||
status=0
|
|
||||||
|
|
||||||
perl vvp_reg.pl || status=1
|
|
||||||
|
|
||||||
if [ "x$1" = "xno-pli1" ] ; then
|
|
||||||
perl vpi_reg.pl || status=1
|
|
||||||
else
|
|
||||||
perl vpi_reg.pl --with-pli1 || status=1
|
|
||||||
fi
|
|
||||||
|
|
||||||
python3 vvp_reg.py || status=1
|
|
||||||
|
|
||||||
exit $status
|
|
||||||
|
|
@ -19,10 +19,15 @@ jobs:
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt update -qq
|
sudo apt update -qq
|
||||||
sudo apt install -y make autoconf python3-sphinx
|
sudo apt install -y make autoconf python3-venv
|
||||||
|
python3 -m venv .venv
|
||||||
|
. .venv/bin/activate
|
||||||
|
pip install --upgrade pip
|
||||||
|
pip install -r Documentation/requirements.txt
|
||||||
|
|
||||||
- name: Make Documentation
|
- name: Make Documentation
|
||||||
run: |
|
run: |
|
||||||
|
. .venv/bin/activate
|
||||||
cd Documentation
|
cd Documentation
|
||||||
make html
|
make html
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,60 +14,82 @@ jobs:
|
||||||
mac:
|
mac:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
libvvp: [true]
|
||||||
|
suffix: [true]
|
||||||
runs-on: macos-15-intel
|
runs-on: macos-15-intel
|
||||||
name: '🍏 macOS'
|
name: 🍏 macOS${{ matrix.libvvp && ' +libvvp' || '' }}${{ matrix.suffix && ' +suffix' || '' }}
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
brew install bison
|
brew install bison
|
||||||
pip3 install --break-system-packages docopt
|
|
||||||
|
|
||||||
- name: Build, check and install
|
- name: Build, check and install
|
||||||
run: |
|
run: |
|
||||||
export PATH="/usr/local/opt/bison/bin:$PATH"
|
export PATH="/usr/local/opt/bison/bin:$PATH"
|
||||||
|
CONFIG_OPTS="--enable-libveriuser"
|
||||||
|
if [ "${{ matrix.libvvp }}" = "true" ]; then
|
||||||
|
CONFIG_OPTS="$CONFIG_OPTS --enable-libvvp"
|
||||||
|
fi
|
||||||
|
if [ "${{ matrix.suffix }}" = "true" ]; then
|
||||||
|
CONFIG_OPTS="$CONFIG_OPTS --enable-suffix"
|
||||||
|
fi
|
||||||
autoconf
|
autoconf
|
||||||
./configure --enable-libveriuser
|
./configure $CONFIG_OPTS
|
||||||
make -j$(nproc) check
|
make -j$(nproc) check
|
||||||
sudo make install
|
sudo make install
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: ./.github/test.sh
|
run: |
|
||||||
|
make check-installed
|
||||||
|
|
||||||
|
|
||||||
lin:
|
lin:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [
|
os: ['22.04', '24.04']
|
||||||
'22.04',
|
# libvvp: [false, true]
|
||||||
'24.04'
|
# suffix: [false, true]
|
||||||
]
|
|
||||||
runs-on: ubuntu-${{ matrix.os }}
|
runs-on: ubuntu-${{ matrix.os }}
|
||||||
name: '🐧 Ubuntu ${{ matrix.os }}'
|
name: 🐧 Ubuntu ${{ matrix.os }}${{ matrix.libvvp && ' +libvvp' || '' }}${{ matrix.suffix && ' +suffix' || '' }}
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt update -qq
|
sudo apt update -qq
|
||||||
sudo apt install -y make g++ git bison flex gperf libreadline-dev libbz2-dev autoconf python3-sphinx python3-docopt
|
sudo apt install -y make g++ git bison flex gperf libreadline-dev libbz2-dev autoconf python3-venv
|
||||||
|
python3 -m venv .venv
|
||||||
|
. .venv/bin/activate
|
||||||
|
pip install --upgrade pip
|
||||||
|
pip install -r Documentation/requirements.txt
|
||||||
|
|
||||||
- name: Build, check and install
|
- name: Build, check and install
|
||||||
run: |
|
run: |
|
||||||
|
CONFIG_OPTS="--enable-libveriuser"
|
||||||
|
if [ "${{ matrix.libvvp }}" = "true" ]; then
|
||||||
|
CONFIG_OPTS="$CONFIG_OPTS --enable-libvvp"
|
||||||
|
fi
|
||||||
|
if [ "${{ matrix.suffix }}" = "true" ]; then
|
||||||
|
CONFIG_OPTS="$CONFIG_OPTS --enable-suffix"
|
||||||
|
fi
|
||||||
autoconf
|
autoconf
|
||||||
./configure --enable-libveriuser
|
./configure $CONFIG_OPTS
|
||||||
make -j$(nproc) check
|
make -j$(nproc) check
|
||||||
sudo make install
|
sudo make install
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: ./.github/test.sh
|
run:
|
||||||
|
make check-installed
|
||||||
|
|
||||||
- name: Documentation
|
- name: Documentation
|
||||||
run: |
|
run: |
|
||||||
|
. .venv/bin/activate
|
||||||
cd Documentation
|
cd Documentation
|
||||||
make html
|
make html
|
||||||
|
|
||||||
|
|
@ -76,11 +98,14 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
msystem: [MINGW64, UCRT64, CLANG64]
|
||||||
|
# libvvp: [false, true]
|
||||||
|
# suffix: [false, true]
|
||||||
include:
|
include:
|
||||||
- { msystem: MINGW64, env: x86_64 }
|
- { msystem: MINGW64, env: x86_64 }
|
||||||
- { msystem: UCRT64, env: ucrt-x86_64 }
|
- { msystem: UCRT64, env: ucrt-x86_64 }
|
||||||
- { msystem: CLANG64, env: clang-x86_64 }
|
- { msystem: CLANG64, env: clang-x86_64 }
|
||||||
name: 🟪 ${{ matrix.msystem}}
|
name: 🟪 ${{ matrix.msystem }}${{ matrix.libvvp && ' +libvvp' || '' }}${{ matrix.suffix && ' +suffix' || '' }}
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
shell: msys2 {0}
|
shell: msys2 {0}
|
||||||
|
|
@ -91,7 +116,7 @@ jobs:
|
||||||
- run: git config --global core.autocrlf input
|
- run: git config --global core.autocrlf input
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v6
|
||||||
|
|
||||||
- uses: msys2/setup-msys2@v2
|
- uses: msys2/setup-msys2@v2
|
||||||
with:
|
with:
|
||||||
|
|
@ -103,16 +128,24 @@ jobs:
|
||||||
python-pip
|
python-pip
|
||||||
mingw-w64-${{ matrix.env }}-perl
|
mingw-w64-${{ matrix.env }}-perl
|
||||||
|
|
||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: '>=3.5'
|
python-version: '>=3.5'
|
||||||
|
|
||||||
- name: Build and check
|
- name: Build and check
|
||||||
run: |
|
run: |
|
||||||
cd msys2
|
cd msys2
|
||||||
|
CONFIG_OPTS=""
|
||||||
if [ ${{ matrix.msystem }} != "CLANG64" ] ; then
|
if [ ${{ matrix.msystem }} != "CLANG64" ] ; then
|
||||||
export IVL_CONFIG_OPTIONS="--enable-libveriuser"
|
CONFIG_OPTS="$CONFIG_OPTS --enable-libveriuser"
|
||||||
fi
|
fi
|
||||||
|
if [ "${{ matrix.libvvp }}" = "true" ] ; then
|
||||||
|
CONFIG_OPTS="$CONFIG_OPTS --enable-libvvp"
|
||||||
|
fi
|
||||||
|
if [ "${{ matrix.suffix }}" = "true" ]; then
|
||||||
|
CONFIG_OPTS="$CONFIG_OPTS --enable-suffix"
|
||||||
|
fi
|
||||||
|
export IVL_CONFIG_OPTIONS="$CONFIG_OPTS"
|
||||||
makepkg-mingw --noconfirm --noprogressbar -sCLf
|
makepkg-mingw --noconfirm --noprogressbar -sCLf
|
||||||
|
|
||||||
- name: Install
|
- name: Install
|
||||||
|
|
@ -120,13 +153,9 @@ jobs:
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: |
|
run: |
|
||||||
if [ ${{ matrix.msystem }} = "CLANG64" ] ; then
|
make check-installed
|
||||||
./.github/test.sh no-pli1
|
|
||||||
else
|
|
||||||
./.github/test.sh
|
|
||||||
fi
|
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v7
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.msystem }}
|
name: 🟪 ${{ matrix.msystem }}${{ matrix.libvvp && ' +libvvp' || '' }}
|
||||||
path: msys2/*.zst
|
path: msys2/*.zst
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,10 @@
|
||||||
*.swp
|
*.swp
|
||||||
*~
|
*~
|
||||||
|
|
||||||
|
# Virtual environments
|
||||||
|
.conda/
|
||||||
|
.venv/
|
||||||
|
|
||||||
# Top level generic files
|
# Top level generic files
|
||||||
tags
|
tags
|
||||||
TAGS
|
TAGS
|
||||||
|
|
@ -31,16 +35,19 @@ Makefile
|
||||||
/_pli_types.h
|
/_pli_types.h
|
||||||
config.h
|
config.h
|
||||||
/tgt-pcb/pcb_config.h
|
/tgt-pcb/pcb_config.h
|
||||||
/tgt-pcb/fp.cc
|
|
||||||
/tgt-pcb/fp.h
|
|
||||||
/tgt-pcb/fp.output
|
|
||||||
/tgt-pcb/fp_lex.cc
|
|
||||||
/tgt-vvp/vvp_config.h
|
/tgt-vvp/vvp_config.h
|
||||||
/tgt-vhdl/vhdl_config.h
|
/tgt-vhdl/vhdl_config.h
|
||||||
|
/vhdlpp/vhdlpp_config.h
|
||||||
/vpi/vpi_config.h
|
/vpi/vpi_config.h
|
||||||
stamp-*-h
|
stamp-*-h
|
||||||
/version.h
|
|
||||||
/version_tag.h
|
/version_tag.h
|
||||||
|
/version_base.h
|
||||||
|
|
||||||
|
/driver-vpi/iverilog-vpi.man
|
||||||
|
/driver-vpi/res.rc
|
||||||
|
/driver/iverilog.man
|
||||||
|
/vvp/libvvp.pc
|
||||||
|
/vvp/vvp.man
|
||||||
|
|
||||||
# Directories
|
# Directories
|
||||||
autom4te.cache
|
autom4te.cache
|
||||||
|
|
@ -52,8 +59,6 @@ dep
|
||||||
*.vpi
|
*.vpi
|
||||||
/cadpli/cadpli.vpl
|
/cadpli/cadpli.vpl
|
||||||
|
|
||||||
/tgt-blif/Makefile
|
|
||||||
|
|
||||||
# lex, yacc and gperf output
|
# lex, yacc and gperf output
|
||||||
/driver/cflexor.c
|
/driver/cflexor.c
|
||||||
/driver/cfparse.c
|
/driver/cfparse.c
|
||||||
|
|
@ -62,14 +67,6 @@ dep
|
||||||
|
|
||||||
/ivlpp/lexor.c
|
/ivlpp/lexor.c
|
||||||
|
|
||||||
/vhdlpp/lexor.cc
|
|
||||||
/vhdlpp/lexor_keyword.cc
|
|
||||||
/vhdlpp/parse.cc
|
|
||||||
/vhdlpp/parse.h
|
|
||||||
/vhdlpp/parse.output
|
|
||||||
/vhdlpp/vhdlpp_config.h
|
|
||||||
/vhdlpp/vhdlpp
|
|
||||||
|
|
||||||
/lexor.cc
|
/lexor.cc
|
||||||
/lexor_keyword.cc
|
/lexor_keyword.cc
|
||||||
/parse.cc
|
/parse.cc
|
||||||
|
|
@ -78,6 +75,17 @@ dep
|
||||||
/syn-rules.cc
|
/syn-rules.cc
|
||||||
/syn-rules.output
|
/syn-rules.output
|
||||||
|
|
||||||
|
/tgt-pcb/fp.cc
|
||||||
|
/tgt-pcb/fp.h
|
||||||
|
/tgt-pcb/fp.output
|
||||||
|
/tgt-pcb/fp_lex.cc
|
||||||
|
|
||||||
|
/vhdlpp/lexor.cc
|
||||||
|
/vhdlpp/lexor_keyword.cc
|
||||||
|
/vhdlpp/parse.cc
|
||||||
|
/vhdlpp/parse.h
|
||||||
|
/vhdlpp/parse.output
|
||||||
|
|
||||||
/vpi/sdf_lexor.c
|
/vpi/sdf_lexor.c
|
||||||
/vpi/sdf_parse.c
|
/vpi/sdf_parse.c
|
||||||
/vpi/sdf_parse.h
|
/vpi/sdf_parse.h
|
||||||
|
|
@ -97,17 +105,13 @@ dep
|
||||||
# Program created files
|
# Program created files
|
||||||
/vvp/tables.cc
|
/vvp/tables.cc
|
||||||
|
|
||||||
/iverilog-vpi.man
|
|
||||||
/driver-vpi/res.rc
|
|
||||||
/driver/iverilog.man
|
|
||||||
/vvp/vvp.man
|
|
||||||
|
|
||||||
# The executables.
|
# The executables.
|
||||||
*.exe
|
*.exe
|
||||||
/driver/iverilog
|
/driver/iverilog
|
||||||
/iverilog-vpi
|
/driver-vpi/iverilog-vpi
|
||||||
/ivl
|
/ivl
|
||||||
/ivlpp/ivlpp
|
/ivlpp/ivlpp
|
||||||
|
/vhdlpp/vhdlpp
|
||||||
/vvp/vvp
|
/vvp/vvp
|
||||||
|
|
||||||
/ivl.exp
|
/ivl.exp
|
||||||
|
|
@ -115,3 +119,4 @@ dep
|
||||||
|
|
||||||
# Check output
|
# Check output
|
||||||
/check.vvp
|
/check.vvp
|
||||||
|
/driver/top.vvp
|
||||||
|
|
|
||||||
|
|
@ -73,16 +73,29 @@ highlight_language = 'none'
|
||||||
|
|
||||||
# -- Options for HTML output -------------------------------------------------
|
# -- Options for HTML output -------------------------------------------------
|
||||||
|
|
||||||
|
# A dictionary of values to pass into the template engine's context for all pages.
|
||||||
|
#
|
||||||
|
html_context = {
|
||||||
|
# Edit this page
|
||||||
|
"source_type": "github",
|
||||||
|
"source_user": "steveicarus",
|
||||||
|
"source_repo": "iverilog",
|
||||||
|
"source_version": "master",
|
||||||
|
"source_docs_path": "/Documentation/",
|
||||||
|
}
|
||||||
|
|
||||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||||
# a list of builtin themes.
|
# a list of builtin themes.
|
||||||
#
|
#
|
||||||
html_theme = 'alabaster'
|
html_theme = 'shibuya'
|
||||||
|
|
||||||
# Theme options are theme-specific and customize the look and feel of a theme
|
# Theme options are theme-specific and customize the look and feel of a theme
|
||||||
# further. For a list of options available for each theme, see the
|
# further. For a list of options available for each theme, see the
|
||||||
# documentation.
|
# documentation.
|
||||||
#
|
#
|
||||||
# html_theme_options = {}
|
html_theme_options = {
|
||||||
|
"github_url": "https://github.com/steveicarus/iverilog",
|
||||||
|
}
|
||||||
|
|
||||||
# Add any paths that contain custom static files (such as style sheets) here,
|
# Add any paths that contain custom static files (such as style sheets) here,
|
||||||
# relative to this directory. They are copied after the builtin static files,
|
# relative to this directory. They are copied after the builtin static files,
|
||||||
|
|
@ -142,7 +155,7 @@ latex_documents = [
|
||||||
# One entry per manual page. List of tuples
|
# One entry per manual page. List of tuples
|
||||||
# (source start file, name, description, authors, manual section).
|
# (source start file, name, description, authors, manual section).
|
||||||
man_pages = [
|
man_pages = [
|
||||||
(master_doc, 'icarusverilog', 'Icarus Verilog Documentation',
|
(master_doc, 'iverilog-docs', 'Icarus Verilog Documentation',
|
||||||
[author], 1)
|
[author], 1)
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ source code itself, so that you can find the global parts where you
|
||||||
can look for even better detail.
|
can look for even better detail.
|
||||||
|
|
||||||
The documentation for getting, building and installing Icarus Verilog
|
The documentation for getting, building and installing Icarus Verilog
|
||||||
is kept and maintained at :doc:`Getting Started as a Contributer <../getting_started>`
|
is kept and maintained at :doc:`Getting Started as a Contributor <../getting_started>`
|
||||||
|
|
||||||
See the Installation Guide for getting the current source from the git
|
See the Installation Guide for getting the current source from the git
|
||||||
repository (and how to use the git repository) and see the Developer Guide
|
repository (and how to use the git repository) and see the Developer Guide
|
||||||
|
|
|
||||||
|
|
@ -812,6 +812,10 @@ result is pushed back on the vec4 stack.
|
||||||
|
|
||||||
This opcode multiplies two real words together.
|
This opcode multiplies two real words together.
|
||||||
|
|
||||||
|
* %neg/wr
|
||||||
|
|
||||||
|
This opcode negates the real value on top of the real stack.
|
||||||
|
|
||||||
* %nand
|
* %nand
|
||||||
|
|
||||||
Perform the bitwise NAND of two vec4 vectors, and push the result. Each
|
Perform the bitwise NAND of two vec4 vectors, and push the result. Each
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ the "make version" target, or automatically if the version_tag.h
|
||||||
file doesn't exist at all. This implies that a "make version" is
|
file doesn't exist at all. This implies that a "make version" is
|
||||||
something worth doing when you do a "git pull" or create commits.
|
something worth doing when you do a "git pull" or create commits.
|
||||||
|
|
||||||
The files below are now edited by the Makefile and the version.exe program:
|
The files below are now edited by the Makefile:
|
||||||
|
|
||||||
* iverilog-vpi.man -- The .TH tag has a version string
|
* iverilog-vpi.man -- The .TH tag has a version string
|
||||||
* driver/iverilog.man -- The .TH tag has a version string
|
* driver/iverilog.man -- The .TH tag has a version string
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
sphinx==8.1.3
|
||||||
|
shibuya==2026.1.9
|
||||||
|
|
@ -68,6 +68,16 @@ These flags affect the general behavior of the compiler.
|
||||||
This flag enables the IEEE1800-2012 standard, which includes
|
This flag enables the IEEE1800-2012 standard, which includes
|
||||||
SystemVerilog.
|
SystemVerilog.
|
||||||
|
|
||||||
|
* 2017
|
||||||
|
|
||||||
|
This flag enables the IEEE1800-2017 standard, which includes
|
||||||
|
SystemVerilog.
|
||||||
|
|
||||||
|
* 2023
|
||||||
|
|
||||||
|
This flag enables the IEEE1800-2023 standard, which includes
|
||||||
|
SystemVerilog.
|
||||||
|
|
||||||
* verilog-ams
|
* verilog-ams
|
||||||
|
|
||||||
This flag enables Verilog-AMS features that are supported by Icarus
|
This flag enables Verilog-AMS features that are supported by Icarus
|
||||||
|
|
@ -131,6 +141,18 @@ These flags affect the general behavior of the compiler.
|
||||||
containing an unsized constant number, and unsized constant numbers are
|
containing an unsized constant number, and unsized constant numbers are
|
||||||
not truncated to integer width.
|
not truncated to integer width.
|
||||||
|
|
||||||
|
* strict-declaration/no-strict-declaration
|
||||||
|
|
||||||
|
* strict-net-var-declaration/no-strict-net-var-declaration
|
||||||
|
|
||||||
|
* strict-parameter-declaration/no-strict-parameter-declaration
|
||||||
|
|
||||||
|
The standards require that nets, variables, and parameters must be
|
||||||
|
declared lexically before they are used. Using -gno-strict-declaration
|
||||||
|
will allow using a data object before declaration, with a warning. The
|
||||||
|
warning can be suppressed with -Wno-declaration-after-use. The option
|
||||||
|
can be applied for nets and variables and for parameters separately.
|
||||||
|
|
||||||
* shared-loop-index/no-shared-loop-index
|
* shared-loop-index/no-shared-loop-index
|
||||||
|
|
||||||
Enable or disable the exclusion of for-loop control variables from
|
Enable or disable the exclusion of for-loop control variables from
|
||||||
|
|
@ -260,6 +282,7 @@ These flags affect the general behavior of the compiler.
|
||||||
-Wanachronisms
|
-Wanachronisms
|
||||||
-Wimplicit
|
-Wimplicit
|
||||||
-Wimplicit-dimensions
|
-Wimplicit-dimensions
|
||||||
|
-Wdeclaration-after-use
|
||||||
-Wmacro-replacement
|
-Wmacro-replacement
|
||||||
-Wportbind
|
-Wportbind
|
||||||
-Wselect-range
|
-Wselect-range
|
||||||
|
|
@ -288,6 +311,15 @@ These flags affect the general behavior of the compiler.
|
||||||
This flag is supported in release 10.1 or master branch snapshots after
|
This flag is supported in release 10.1 or master branch snapshots after
|
||||||
2016-02-06.
|
2016-02-06.
|
||||||
|
|
||||||
|
* declaration-after-use
|
||||||
|
|
||||||
|
This enables warnings for declarations after use, when those are not
|
||||||
|
flagged as errors (enabled by default). Use no-declaration-after-use
|
||||||
|
to disable this.
|
||||||
|
|
||||||
|
This flag was added in version 14.0 or later (and is in the master branch
|
||||||
|
as of 2026-03-21).
|
||||||
|
|
||||||
* macro-redefinition
|
* macro-redefinition
|
||||||
|
|
||||||
This enables warnings when a macro is redefined, even if the macro text
|
This enables warnings when a macro is redefined, even if the macro text
|
||||||
|
|
|
||||||
|
|
@ -373,7 +373,5 @@ Next, compile with the command::
|
||||||
|
|
||||||
$ make
|
$ make
|
||||||
|
|
||||||
The configure generated the cross compiler flags, but there are a few
|
The configure generated the cross compiler flags. The
|
||||||
bits that need to be compiled with the native compiler. (version.exe
|
|
||||||
for example is used by the build process but is not installed.) The
|
|
||||||
configure script should have gotten all that right.
|
configure script should have gotten all that right.
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
Reporting Issues
|
Reporting Issues
|
||||||
================
|
================
|
||||||
|
|
||||||
The developers of and contributers to Icarus Verilog use github to track
|
The developers of and contributors to Icarus Verilog use github to track
|
||||||
issues and to create patches for the product. If you believe you have found a
|
issues and to create patches for the product. If you believe you have found a
|
||||||
problem, use the Issues tracker at the
|
problem, use the Issues tracker at the
|
||||||
`Icarus Verilog github page <https://github.com/steveicarus/iverilog>`__.
|
`Icarus Verilog github page <https://github.com/steveicarus/iverilog>`__.
|
||||||
|
|
@ -60,7 +60,7 @@ Bug reports with patches/PRs are very welcome. Please also add a new test case i
|
||||||
|
|
||||||
If you are editing the source, you should be using the latest
|
If you are editing the source, you should be using the latest
|
||||||
version from git. Please see the developer documentation for more
|
version from git. Please see the developer documentation for more
|
||||||
detailed instructions -- :doc:`Getting Started as a Contributer <getting_started>` .
|
detailed instructions -- :doc:`Getting Started as a Contributor <getting_started>` .
|
||||||
|
|
||||||
COPYRIGHT ISSUES
|
COPYRIGHT ISSUES
|
||||||
|
|
||||||
|
|
|
||||||
165
Makefile.in
165
Makefile.in
|
|
@ -36,9 +36,12 @@ prefix = @prefix@
|
||||||
exec_prefix = @exec_prefix@
|
exec_prefix = @exec_prefix@
|
||||||
srcdir = @srcdir@
|
srcdir = @srcdir@
|
||||||
datarootdir = @datarootdir@
|
datarootdir = @datarootdir@
|
||||||
|
VERSION_MAJOR = @VERSION_MAJOR@
|
||||||
|
VERSION_MINOR = @VERSION_MINOR@
|
||||||
|
|
||||||
SUBDIRS = ivlpp vhdlpp vvp vpi tgt-null tgt-stub tgt-vvp \
|
SUBDIRS = ivlpp vhdlpp vvp vpi tgt-null tgt-stub tgt-vvp \
|
||||||
tgt-vhdl tgt-vlog95 tgt-pcb tgt-blif tgt-sizer driver
|
tgt-vhdl tgt-vlog95 tgt-pcb tgt-blif tgt-sizer driver \
|
||||||
|
ivtest
|
||||||
# Only run distclean for these directories.
|
# Only run distclean for these directories.
|
||||||
NOTUSED = tgt-fpga tgt-pal tgt-verilog
|
NOTUSED = tgt-fpga tgt-pal tgt-verilog
|
||||||
|
|
||||||
|
|
@ -48,11 +51,7 @@ else
|
||||||
NOTUSED += libveriuser cadpli
|
NOTUSED += libveriuser cadpli
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq (@MINGW32@,yes)
|
|
||||||
SUBDIRS += driver-vpi
|
SUBDIRS += driver-vpi
|
||||||
else
|
|
||||||
NOTUSED += driver-vpi
|
|
||||||
endif
|
|
||||||
|
|
||||||
# To get the version headers to build correctly we only want to look
|
# To get the version headers to build correctly we only want to look
|
||||||
# for C++ files in the source directory. All other files will require
|
# for C++ files in the source directory. All other files will require
|
||||||
|
|
@ -67,9 +66,7 @@ bindir = @bindir@
|
||||||
libdir = @libdir@
|
libdir = @libdir@
|
||||||
# This is actually the directory where we install our own header files.
|
# This is actually the directory where we install our own header files.
|
||||||
# It is a little different from the generic includedir.
|
# It is a little different from the generic includedir.
|
||||||
includedir = @includedir@/iverilog$(suffix)
|
ivl_includedir = @includedir@/iverilog$(suffix)
|
||||||
mandir = @mandir@
|
|
||||||
pdfdir = @docdir@
|
|
||||||
|
|
||||||
dllib=@DLLIB@
|
dllib=@DLLIB@
|
||||||
|
|
||||||
|
|
@ -81,12 +78,14 @@ BUILDCC = @CC_FOR_BUILD@
|
||||||
BUILDEXT = @BUILD_EXEEXT@
|
BUILDEXT = @BUILD_EXEEXT@
|
||||||
CC = @CC@
|
CC = @CC@
|
||||||
CXX = @CXX@
|
CXX = @CXX@
|
||||||
|
ENV_VVP=@ENV_VVP@
|
||||||
INSTALL = @INSTALL@
|
INSTALL = @INSTALL@
|
||||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
INSTALL_DATA = @INSTALL_DATA@
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
LEX = @LEX@
|
LEX = @LEX@
|
||||||
YACC = @YACC@
|
YACC = @YACC@
|
||||||
|
YACC_CONFLICT_FLAGS = -Werror=conflicts-sr -Werror=conflicts-rr
|
||||||
MAN = @MAN@
|
MAN = @MAN@
|
||||||
PS2PDF = @PS2PDF@
|
PS2PDF = @PS2PDF@
|
||||||
GROFF = @GROFF@
|
GROFF = @GROFF@
|
||||||
|
|
@ -131,7 +130,7 @@ O = main.o async.o design_dump.o discipline.o dup_expr.o elaborate.o \
|
||||||
PGate.o PGenerate.o PModport.o PNamedItem.o PPackage.o PScope.o PSpec.o PTimingCheck.o \
|
PGate.o PGenerate.o PModport.o PNamedItem.o PPackage.o PScope.o PSpec.o PTimingCheck.o \
|
||||||
PTask.o PUdp.o PWire.o Statement.o AStatement.o $M $(FF) $(TT)
|
PTask.o PUdp.o PWire.o Statement.o AStatement.o $M $(FF) $(TT)
|
||||||
|
|
||||||
all: dep config.h _pli_types.h version_tag.h ivl@EXEEXT@ version.exe iverilog-vpi.man
|
all: dep config.h _pli_types.h version_tag.h version_base.h ivl@EXEEXT@
|
||||||
$(foreach dir,$(SUBDIRS),$(MAKE) -C $(dir) $@ && ) true
|
$(foreach dir,$(SUBDIRS),$(MAKE) -C $(dir) $@ && ) true
|
||||||
|
|
||||||
# In the windows world, the installer will need a dosify program to
|
# In the windows world, the installer will need a dosify program to
|
||||||
|
|
@ -142,34 +141,26 @@ dosify$(BUILDEXT): $(srcdir)/dosify.c
|
||||||
$(BUILDCC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o dosify$(BUILDEXT) $(srcdir)/dosify.c
|
$(BUILDCC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o dosify$(BUILDEXT) $(srcdir)/dosify.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# This rule rules the compiler in the trivial hello.vl program to make
|
# This rule runs the compiler using the trivial hello.vl program to make sure
|
||||||
# sure the basics were compiled properly.
|
# the base programs are compiled properly.
|
||||||
check: all
|
check: all
|
||||||
$(foreach dir,$(SUBDIRS),$(MAKE) -C $(dir) $@ && ) true
|
$(foreach dir,$(SUBDIRS),$(MAKE) -C $(dir) $@ && ) true
|
||||||
|
rm -f check.vvp
|
||||||
test -r check.conf || cp $(srcdir)/check.conf .
|
test -r check.conf || cp $(srcdir)/check.conf .
|
||||||
driver/iverilog -B. -BMvpi -BPivlpp -tcheck -ocheck.vvp $(srcdir)/examples/hello.vl
|
driver/iverilog@EXEEXT@ -B. -BMvpi -BPivlpp -tcheck -ocheck.vvp $(srcdir)/examples/hello.vl && \
|
||||||
ifeq (@WIN32@,yes)
|
$(ENV_VVP) vvp/vvp$(suffix)@EXEEXT@ -M- -M./vpi ./check.vvp | grep 'Hello, World'
|
||||||
ifeq (@install_suffix@,)
|
|
||||||
vvp/vvp -M- -M./vpi ./check.vvp | grep 'Hello, World'
|
check-installed check-installed-vpi check-installed-vvp check-installed-vvp-py:
|
||||||
else
|
$(MAKE) -C ivtest $@
|
||||||
# On Windows if we have a suffix we must run the vvp part of
|
|
||||||
# the test with a suffix since it was built/linked that way.
|
|
||||||
ln vvp/vvp.exe vvp/vvp$(suffix).exe
|
|
||||||
vvp/vvp$(suffix) -M- -M./vpi ./check.vvp | grep 'Hello, World'
|
|
||||||
rm vvp/vvp$(suffix).exe
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
vvp/vvp -M- -M./vpi ./check.vvp | grep 'Hello, World'
|
|
||||||
endif
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(foreach dir,$(SUBDIRS),$(MAKE) -C $(dir) $@ && ) true
|
$(foreach dir,$(SUBDIRS),$(MAKE) -C $(dir) $@ && ) true
|
||||||
rm -f *.o parse.cc parse.h lexor.cc
|
rm -f *.o parse.cc parse.h lexor.cc
|
||||||
rm -f ivl.exp iverilog-vpi.man iverilog-vpi.pdf iverilog-vpi.ps
|
rm -f ivl.exp
|
||||||
|
rm -f iverilog_man.ps iverilog_man.pdf iverilog_man_$(VERSION_MAJOR)_$(VERSION_MINOR).pdf
|
||||||
rm -f parse.output syn-rules.output dosify$(BUILDEXT) ivl@EXEEXT@ check.vvp
|
rm -f parse.output syn-rules.output dosify$(BUILDEXT) ivl@EXEEXT@ check.vvp
|
||||||
rm -f lexor_keyword.cc libivl.a libvpi.a iverilog-vpi syn-rules.cc
|
rm -f lexor_keyword.cc libivl.a libvpi.a syn-rules.cc
|
||||||
rm -rf dep
|
rm -rf dep
|
||||||
rm -f version.exe
|
|
||||||
|
|
||||||
distclean: clean
|
distclean: clean
|
||||||
$(foreach dir,$(SUBDIRS),$(MAKE) -C $(dir) $@ && ) true
|
$(foreach dir,$(SUBDIRS),$(MAKE) -C $(dir) $@ && ) true
|
||||||
|
|
@ -177,13 +168,14 @@ distclean: clean
|
||||||
rm -f Makefile config.status config.log config.cache
|
rm -f Makefile config.status config.log config.cache
|
||||||
rm -f stamp-config-h config.h
|
rm -f stamp-config-h config.h
|
||||||
rm -f stamp-_pli_types-h _pli_types.h
|
rm -f stamp-_pli_types-h _pli_types.h
|
||||||
|
rm -f stamp-version_base-h version_base.h
|
||||||
ifneq (@srcdir@,.)
|
ifneq (@srcdir@,.)
|
||||||
rm -f version_tag.h check.conf
|
rm -f version_tag.h check.conf
|
||||||
rmdir $(SUBDIRS) $(NOTUSED)
|
rmdir $(SUBDIRS) $(NOTUSED)
|
||||||
endif
|
endif
|
||||||
rm -rf autom4te.cache
|
rm -rf autom4te.cache
|
||||||
|
|
||||||
cppcheck: $(O:.o=.cc) $(srcdir)/dosify.c $(srcdir)/version.c
|
cppcheck: $(O:.o=.cc) $(srcdir)/dosify.c
|
||||||
cppcheck --enable=all --std=c99 --std=c++11 -f \
|
cppcheck --enable=all --std=c99 --std=c++11 -f \
|
||||||
--check-level=exhaustive \
|
--check-level=exhaustive \
|
||||||
--suppressions-list=$(srcdir)/cppcheck-global.sup \
|
--suppressions-list=$(srcdir)/cppcheck-global.sup \
|
||||||
|
|
@ -214,6 +206,11 @@ stamp-_pli_types-h: $(srcdir)/_pli_types.h.in config.status
|
||||||
./config.status _pli_types.h
|
./config.status _pli_types.h
|
||||||
_pli_types.h: stamp-_pli_types-h
|
_pli_types.h: stamp-_pli_types-h
|
||||||
|
|
||||||
|
stamp-version_base-h: $(srcdir)/version_base.h.in config.status
|
||||||
|
@rm -f $@
|
||||||
|
./config.status version_base.h
|
||||||
|
version_base.h: stamp-version_base-h
|
||||||
|
|
||||||
$(srcdir)/configure: $(srcdir)/configure.ac $(srcdir)/aclocal.m4
|
$(srcdir)/configure: $(srcdir)/configure.ac $(srcdir)/aclocal.m4
|
||||||
cd $(srcdir) && autoconf
|
cd $(srcdir) && autoconf
|
||||||
|
|
||||||
|
|
@ -232,27 +229,7 @@ ivl@EXEEXT@: $O
|
||||||
$(CXX) $(LDFLAGS) -o ivl@EXEEXT@ $O $(dllib)
|
$(CXX) $(LDFLAGS) -o ivl@EXEEXT@ $O $(dllib)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq (@MINGW32@,no)
|
%.o: %.cc config.h | dep
|
||||||
all: iverilog-vpi
|
|
||||||
|
|
||||||
iverilog-vpi: $(srcdir)/iverilog-vpi.sh Makefile
|
|
||||||
sed -e 's;@SHARED@;@shared@;' -e 's;@PIC@;@PICFLAG@;' \
|
|
||||||
-e 's;@ENABLE_PLI1@;@LIBVERIUSER@;' \
|
|
||||||
-e 's;@SUFFIX@;$(suffix);' \
|
|
||||||
-e 's;@IVCC@;$(CC);' \
|
|
||||||
-e 's;@IVCXX@;$(CXX);' \
|
|
||||||
-e 's;@IVCFLAGS@;$(CFLAGS);' \
|
|
||||||
-e 's;@IVCXXFLAGS@;$(CXXFLAGS);' \
|
|
||||||
-e 's;@IVCTARGETFLAGS@;$(CTARGETFLAGS);' \
|
|
||||||
-e 's;@INCLUDEDIR@;$(includedir);' \
|
|
||||||
-e 's;@LIBDIR@;@libdir@;' $< > $@
|
|
||||||
chmod +x $@
|
|
||||||
endif
|
|
||||||
|
|
||||||
version.exe: $(srcdir)/version.c $(srcdir)/version_base.h version_tag.h
|
|
||||||
$(BUILDCC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o version.exe -I. -I$(srcdir) $(srcdir)/version.c
|
|
||||||
|
|
||||||
%.o: %.cc config.h
|
|
||||||
$(CXX) $(CPPFLAGS) $(CXXFLAGS) @DEPENDENCY_FLAG@ -c $< -o $*.o
|
$(CXX) $(CPPFLAGS) $(CXXFLAGS) @DEPENDENCY_FLAG@ -c $< -o $*.o
|
||||||
mv $*.d dep/$*.d
|
mv $*.d dep/$*.d
|
||||||
|
|
||||||
|
|
@ -265,10 +242,10 @@ parse.o: parse.cc
|
||||||
|
|
||||||
# Use pattern rules to avoid parallel build issues (see pr3462585)
|
# Use pattern rules to avoid parallel build issues (see pr3462585)
|
||||||
parse%cc parse%h: $(srcdir)/parse%y
|
parse%cc parse%h: $(srcdir)/parse%y
|
||||||
$(YACC) --verbose -t -p VL --defines=parse.h -o parse.cc $<
|
$(YACC) --verbose $(YACC_CONFLICT_FLAGS) -t -p VL --defines=parse.h -o parse.cc $<
|
||||||
|
|
||||||
syn-rules.cc: $(srcdir)/syn-rules.y
|
syn-rules.cc: $(srcdir)/syn-rules.y
|
||||||
$(YACC) --verbose -t -p syn_ -o $@ $<
|
$(YACC) --verbose $(YACC_CONFLICT_FLAGS) -t -p syn_ -o $@ $<
|
||||||
|
|
||||||
lexor.cc: $(srcdir)/lexor.lex
|
lexor.cc: $(srcdir)/lexor.lex
|
||||||
$(LEX) -s -t $< > $@
|
$(LEX) -s -t $< > $@
|
||||||
|
|
@ -278,22 +255,12 @@ lexor_keyword.o: lexor_keyword.cc parse.h
|
||||||
lexor_keyword.cc: $(srcdir)/lexor_keyword.gperf
|
lexor_keyword.cc: $(srcdir)/lexor_keyword.gperf
|
||||||
gperf -o -i 7 -C -k 1-4,6,9,$$ -H keyword_hash -N check_identifier -t $< > $@ || (rm -f $@ ; false)
|
gperf -o -i 7 -C -k 1-4,6,9,$$ -H keyword_hash -N check_identifier -t $< > $@ || (rm -f $@ ; false)
|
||||||
|
|
||||||
iverilog-vpi.man: $(srcdir)/iverilog-vpi.man.in version.exe
|
iverilog_man.ps: driver/iverilog.man vvp/vvp.man driver-vpi/iverilog-vpi.man
|
||||||
./version.exe `head -1 $<`'\n' > $@
|
|
||||||
tail -n +2 $< >> $@
|
|
||||||
|
|
||||||
iverilog-vpi.ps: iverilog-vpi.man
|
|
||||||
$(MAN) -t ./$< > $@
|
|
||||||
|
|
||||||
iverilog-vpi.pdf: iverilog-vpi.ps
|
|
||||||
$(PS2PDF) $< $@
|
|
||||||
|
|
||||||
iverilog_man.ps: driver/iverilog.man vvp/vvp.man iverilog-vpi.man
|
|
||||||
$(GROFF) -man -rC1 -rD1 -T ps $^ > $@
|
$(GROFF) -man -rC1 -rD1 -T ps $^ > $@
|
||||||
|
|
||||||
iverilog_man.pdf: iverilog_man.ps version.exe
|
iverilog_man.pdf: iverilog_man.ps
|
||||||
$(PS2PDF) $< $@
|
$(PS2PDF) $< $@
|
||||||
cp $@ iverilog_man_`./version.exe %M_%n`.pdf
|
cp $@ iverilog_man_$(VERSION_MAJOR)_$(VERSION_MINOR).pdf
|
||||||
|
|
||||||
# For VERSION_TAG in driver/main.c, first try git-describe, then look for a
|
# For VERSION_TAG in driver/main.c, first try git-describe, then look for a
|
||||||
# release_tag.h file in the source tree (included in snapshots and releases),
|
# release_tag.h file in the source tree (included in snapshots and releases),
|
||||||
|
|
@ -319,33 +286,6 @@ version_tag.h version:
|
||||||
echo '#define VERSION_TAG ""' > version_tag.h; \
|
echo '#define VERSION_TAG ""' > version_tag.h; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ifeq (@MINGW32@,yes)
|
|
||||||
ifeq ($(MAN),none)
|
|
||||||
INSTALL_DOC = installman
|
|
||||||
INSTALL_PDFDIR = $(prefix)
|
|
||||||
else
|
|
||||||
ifeq ($(PS2PDF),none)
|
|
||||||
INSTALL_DOC = installman
|
|
||||||
INSTALL_PDFDIR = $(prefix)
|
|
||||||
else
|
|
||||||
INSTALL_DOC = installpdf installman
|
|
||||||
INSTALL_PDFDIR = $(pdfdir)
|
|
||||||
all: dep iverilog-vpi.pdf
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
INSTALL_DOCDIR = $(mandir)/man1
|
|
||||||
else
|
|
||||||
INSTALL_DOC = installman
|
|
||||||
INSTALL_DOCDIR = $(mandir)/man1
|
|
||||||
INSTALL_PDFDIR = $(prefix)
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq (@MINGW32@,yes)
|
|
||||||
WIN32_INSTALL =
|
|
||||||
else
|
|
||||||
WIN32_INSTALL = installwin32
|
|
||||||
endif
|
|
||||||
|
|
||||||
install: all installdirs installfiles
|
install: all installdirs installfiles
|
||||||
$(foreach dir,$(SUBDIRS),$(MAKE) -C $(dir) $@ && ) true
|
$(foreach dir,$(SUBDIRS),$(MAKE) -C $(dir) $@ && ) true
|
||||||
|
|
||||||
|
|
@ -357,37 +297,24 @@ F = ./ivl@EXEEXT@ \
|
||||||
$(srcdir)/sv_vpi_user.h \
|
$(srcdir)/sv_vpi_user.h \
|
||||||
$(srcdir)/vpi_user.h \
|
$(srcdir)/vpi_user.h \
|
||||||
$(srcdir)/acc_user.h \
|
$(srcdir)/acc_user.h \
|
||||||
$(srcdir)/veriuser.h \
|
$(srcdir)/veriuser.h
|
||||||
$(INSTALL_DOC) \
|
|
||||||
$(WIN32_INSTALL)
|
|
||||||
|
|
||||||
installwin32: ./iverilog-vpi installdirs
|
|
||||||
$(INSTALL_SCRIPT) ./iverilog-vpi "$(DESTDIR)$(bindir)/iverilog-vpi$(suffix)"
|
|
||||||
|
|
||||||
installman: iverilog-vpi.man installdirs
|
|
||||||
$(INSTALL_DATA) iverilog-vpi.man "$(DESTDIR)$(mandir)/man1/iverilog-vpi$(suffix).1"
|
|
||||||
|
|
||||||
installpdf: iverilog-vpi.pdf installdirs
|
|
||||||
$(INSTALL_DATA) iverilog-vpi.pdf "$(DESTDIR)$(pdfdir)/iverilog-vpi$(suffix).pdf"
|
|
||||||
|
|
||||||
installfiles: $(F) | installdirs
|
installfiles: $(F) | installdirs
|
||||||
$(INSTALL_PROGRAM) ./ivl@EXEEXT@ "$(DESTDIR)$(libdir)/ivl$(suffix)/ivl@EXEEXT@"
|
$(INSTALL_PROGRAM) ./ivl@EXEEXT@ "$(DESTDIR)$(libdir)/ivl$(suffix)/ivl@EXEEXT@"
|
||||||
$(INSTALL_DATA) $(srcdir)/constants.vams "$(DESTDIR)$(libdir)/ivl$(suffix)/include/constants.vams"
|
$(INSTALL_DATA) $(srcdir)/constants.vams "$(DESTDIR)$(libdir)/ivl$(suffix)/include/constants.vams"
|
||||||
$(INSTALL_DATA) $(srcdir)/disciplines.vams "$(DESTDIR)$(libdir)/ivl$(suffix)/include/disciplines.vams"
|
$(INSTALL_DATA) $(srcdir)/disciplines.vams "$(DESTDIR)$(libdir)/ivl$(suffix)/include/disciplines.vams"
|
||||||
$(INSTALL_DATA) $(srcdir)/ivl_target.h "$(DESTDIR)$(includedir)/ivl_target.h"
|
$(INSTALL_DATA) $(srcdir)/ivl_target.h "$(DESTDIR)$(ivl_includedir)/ivl_target.h"
|
||||||
$(INSTALL_DATA) ./_pli_types.h "$(DESTDIR)$(includedir)/_pli_types.h"
|
$(INSTALL_DATA) ./_pli_types.h "$(DESTDIR)$(ivl_includedir)/_pli_types.h"
|
||||||
$(INSTALL_DATA) $(srcdir)/sv_vpi_user.h "$(DESTDIR)$(includedir)/sv_vpi_user.h"
|
$(INSTALL_DATA) $(srcdir)/sv_vpi_user.h "$(DESTDIR)$(ivl_includedir)/sv_vpi_user.h"
|
||||||
$(INSTALL_DATA) $(srcdir)/vpi_user.h "$(DESTDIR)$(includedir)/vpi_user.h"
|
$(INSTALL_DATA) $(srcdir)/vpi_user.h "$(DESTDIR)$(ivl_includedir)/vpi_user.h"
|
||||||
$(INSTALL_DATA) $(srcdir)/acc_user.h "$(DESTDIR)$(includedir)/acc_user.h"
|
$(INSTALL_DATA) $(srcdir)/acc_user.h "$(DESTDIR)$(ivl_includedir)/acc_user.h"
|
||||||
$(INSTALL_DATA) $(srcdir)/veriuser.h "$(DESTDIR)$(includedir)/veriuser.h"
|
$(INSTALL_DATA) $(srcdir)/veriuser.h "$(DESTDIR)$(ivl_includedir)/veriuser.h"
|
||||||
|
|
||||||
installdirs: $(srcdir)/mkinstalldirs
|
installdirs: $(srcdir)/mkinstalldirs
|
||||||
$(srcdir)/mkinstalldirs "$(DESTDIR)$(bindir)" \
|
$(srcdir)/mkinstalldirs "$(DESTDIR)$(bindir)" \
|
||||||
"$(DESTDIR)$(includedir)" \
|
"$(DESTDIR)$(ivl_includedir)" \
|
||||||
"$(DESTDIR)$(libdir)/ivl$(suffix)" \
|
"$(DESTDIR)$(libdir)/ivl$(suffix)" \
|
||||||
"$(DESTDIR)$(libdir)/ivl$(suffix)/include" \
|
"$(DESTDIR)$(libdir)/ivl$(suffix)/include"
|
||||||
"$(DESTDIR)$(INSTALL_DOCDIR)" \
|
|
||||||
"$(DESTDIR)$(INSTALL_PDFDIR)"
|
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
$(foreach dir,$(SUBDIRS),$(MAKE) -C $(dir) $@ && ) true
|
$(foreach dir,$(SUBDIRS),$(MAKE) -C $(dir) $@ && ) true
|
||||||
|
|
@ -395,13 +322,13 @@ uninstall:
|
||||||
do rm -f "$(DESTDIR)$(libdir)/ivl$(suffix)/$$f"; done
|
do rm -f "$(DESTDIR)$(libdir)/ivl$(suffix)/$$f"; done
|
||||||
-rmdir "$(DESTDIR)$(libdir)/ivl$(suffix)/include"
|
-rmdir "$(DESTDIR)$(libdir)/ivl$(suffix)/include"
|
||||||
-rmdir "$(DESTDIR)$(libdir)/ivl$(suffix)"
|
-rmdir "$(DESTDIR)$(libdir)/ivl$(suffix)"
|
||||||
for f in verilog$(suffix) iverilog-vpi$(suffix) gverilog$(suffix)@EXEEXT@; \
|
for f in verilog$(suffix) gverilog$(suffix)@EXEEXT@; \
|
||||||
do rm -f "$(DESTDIR)$(bindir)/$$f"; done
|
do rm -f "$(DESTDIR)$(bindir)/$$f"; done
|
||||||
for f in ivl_target.h vpi_user.h _pli_types.h sv_vpi_user.h acc_user.h veriuser.h; \
|
for f in ivl_target.h vpi_user.h _pli_types.h sv_vpi_user.h acc_user.h veriuser.h; \
|
||||||
do rm -f "$(DESTDIR)$(includedir)/$$f"; done
|
do rm -f "$(DESTDIR)$(ivl_includedir)/$$f"; done
|
||||||
-test X$(suffix) = X || rmdir "$(DESTDIR)$(includedir)"
|
-test X$(suffix) = X || rmdir "$(DESTDIR)$(ivl_includedir)"
|
||||||
rm -f "$(DESTDIR)$(mandir)/man1/iverilog-vpi$(suffix).1" \
|
|
||||||
"$(DESTDIR)$(pdfdir)/iverilog-vpi$(suffix).pdf"
|
|
||||||
|
|
||||||
|
|
||||||
-include $(patsubst %.o, dep/%.d, $O)
|
-include $(patsubst %.o, dep/%.d, $O)
|
||||||
|
|
||||||
|
.PHONY: check-installed check-installed-vpi check-installed-vvp check-installed-vvp-py
|
||||||
|
|
|
||||||
62
Module.cc
62
Module.cc
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1998-2022 Stephen Williams (steve@icarus.com)
|
* Copyright (c) 1998-2026 Stephen Williams (steve@icarus.com)
|
||||||
*
|
*
|
||||||
* This source code is free software; you can redistribute it
|
* This source code is free software; you can redistribute it
|
||||||
* and/or modify it in source code form under the terms of the GNU
|
* and/or modify it in source code form under the terms of the GNU
|
||||||
|
|
@ -21,13 +21,65 @@
|
||||||
|
|
||||||
# include "Module.h"
|
# include "Module.h"
|
||||||
# include "PGate.h"
|
# include "PGate.h"
|
||||||
|
# include "PModport.h"
|
||||||
# include "PWire.h"
|
# include "PWire.h"
|
||||||
|
# include "parse_api.h"
|
||||||
# include "ivl_assert.h"
|
# include "ivl_assert.h"
|
||||||
|
# include <iostream>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
list<Module::named_expr_t> Module::user_defparms;
|
list<Module::named_expr_t> Module::user_defparms;
|
||||||
|
|
||||||
|
Module::port_t::port_t()
|
||||||
|
: port_kind(P_SIGNAL), default_value(0), interface_unpacked_dimensions(0), lexical_pos(0)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
bool resolve_interface_formal_port(const LineInfo*li, Design*des,
|
||||||
|
const Module::port_t*port,
|
||||||
|
interface_formal_port_t&res,
|
||||||
|
bool emit_errors)
|
||||||
|
{
|
||||||
|
ivl_assert(*li, port);
|
||||||
|
ivl_assert(*li, port->is_interface_port());
|
||||||
|
|
||||||
|
res = interface_formal_port_t();
|
||||||
|
|
||||||
|
map<perm_string,Module*>::const_iterator mod =
|
||||||
|
pform_modules.find(port->interface_type);
|
||||||
|
if (mod == pform_modules.end() || !mod->second->is_interface) {
|
||||||
|
if (emit_errors) {
|
||||||
|
cerr << li->get_fileline() << ": error: Interface port "
|
||||||
|
<< port->name << " uses unknown interface type `"
|
||||||
|
<< port->interface_type << "'." << endl;
|
||||||
|
des->errors += 1;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
res.module = mod->second;
|
||||||
|
|
||||||
|
if (port->modport_name.str()) {
|
||||||
|
map<perm_string,PModport*>::const_iterator mp =
|
||||||
|
mod->second->modports.find(port->modport_name);
|
||||||
|
if (mp == mod->second->modports.end()) {
|
||||||
|
if (emit_errors) {
|
||||||
|
cerr << li->get_fileline() << ": error: Interface port "
|
||||||
|
<< port->name << " uses unknown modport `"
|
||||||
|
<< port->modport_name << "' of interface `"
|
||||||
|
<< port->interface_type << "'." << endl;
|
||||||
|
des->errors += 1;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
res.modport = mp->second;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/* n is a permallocated string. */
|
/* n is a permallocated string. */
|
||||||
Module::Module(LexicalScope*parent, perm_string n)
|
Module::Module(LexicalScope*parent, perm_string n)
|
||||||
: PScopeExtra(n, parent)
|
: PScopeExtra(n, parent)
|
||||||
|
|
@ -63,12 +115,18 @@ const vector<PEIdent*>& Module::get_port(unsigned idx) const
|
||||||
ivl_assert(*this, idx < ports.size());
|
ivl_assert(*this, idx < ports.size());
|
||||||
static const vector<PEIdent*> zero;
|
static const vector<PEIdent*> zero;
|
||||||
|
|
||||||
if (ports[idx])
|
if (ports[idx] && !ports[idx]->is_interface_port())
|
||||||
return ports[idx]->expr;
|
return ports[idx]->expr;
|
||||||
else
|
else
|
||||||
return zero;
|
return zero;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const Module::port_t* Module::get_port_info(unsigned idx) const
|
||||||
|
{
|
||||||
|
ivl_assert(*this, idx < ports.size());
|
||||||
|
return ports[idx];
|
||||||
|
}
|
||||||
|
|
||||||
unsigned Module::find_port(const char*name) const
|
unsigned Module::find_port(const char*name) const
|
||||||
{
|
{
|
||||||
ivl_assert(*this, name != 0);
|
ivl_assert(*this, name != 0);
|
||||||
|
|
|
||||||
32
Module.h
32
Module.h
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef IVL_Module_H
|
#ifndef IVL_Module_H
|
||||||
#define IVL_Module_H
|
#define IVL_Module_H
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1998-2025 Stephen Williams (steve@icarus.com)
|
* Copyright (c) 1998-2026 Stephen Williams (steve@icarus.com)
|
||||||
*
|
*
|
||||||
* This source code is free software; you can redistribute it
|
* This source code is free software; you can redistribute it
|
||||||
* and/or modify it in source code form under the terms of the GNU
|
* and/or modify it in source code form under the terms of the GNU
|
||||||
|
|
@ -43,6 +43,7 @@ class PFunction;
|
||||||
class PWire;
|
class PWire;
|
||||||
class PProcess;
|
class PProcess;
|
||||||
class Design;
|
class Design;
|
||||||
|
class LineInfo;
|
||||||
class NetScope;
|
class NetScope;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -65,9 +66,25 @@ class Module : public PScopeExtra, public PNamedItem {
|
||||||
default value. */
|
default value. */
|
||||||
public:
|
public:
|
||||||
struct port_t {
|
struct port_t {
|
||||||
|
enum port_kind_t { P_SIGNAL, P_INTERFACE };
|
||||||
|
|
||||||
|
port_t();
|
||||||
|
|
||||||
|
port_kind_t port_kind;
|
||||||
perm_string name;
|
perm_string name;
|
||||||
std::vector<PEIdent*> expr;
|
std::vector<PEIdent*> expr;
|
||||||
PExpr*default_value;
|
PExpr*default_value;
|
||||||
|
|
||||||
|
/* Interface formal port metadata. For signal ports these
|
||||||
|
fields are empty/zero. The modport name is optional in the
|
||||||
|
representation, although the parser initially only accepts
|
||||||
|
the explicit interface_type.modport form. */
|
||||||
|
perm_string interface_type;
|
||||||
|
perm_string modport_name;
|
||||||
|
std::list<pform_range_t>*interface_unpacked_dimensions;
|
||||||
|
unsigned lexical_pos;
|
||||||
|
|
||||||
|
bool is_interface_port() const { return port_kind == P_INTERFACE; }
|
||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
@ -148,6 +165,7 @@ class Module : public PScopeExtra, public PNamedItem {
|
||||||
|
|
||||||
unsigned port_count() const;
|
unsigned port_count() const;
|
||||||
const std::vector<PEIdent*>& get_port(unsigned idx) const;
|
const std::vector<PEIdent*>& get_port(unsigned idx) const;
|
||||||
|
const port_t* get_port_info(unsigned idx) const;
|
||||||
unsigned find_port(const char*name) const;
|
unsigned find_port(const char*name) const;
|
||||||
|
|
||||||
// Return port name ("" for undeclared port)
|
// Return port name ("" for undeclared port)
|
||||||
|
|
@ -181,4 +199,16 @@ class Module : public PScopeExtra, public PNamedItem {
|
||||||
Module& operator= (const Module&);
|
Module& operator= (const Module&);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct interface_formal_port_t {
|
||||||
|
interface_formal_port_t() : module(0), modport(0) { }
|
||||||
|
|
||||||
|
const Module*module;
|
||||||
|
const PModport*modport;
|
||||||
|
};
|
||||||
|
|
||||||
|
extern bool resolve_interface_formal_port(const LineInfo*li, Design*des,
|
||||||
|
const Module::port_t*port,
|
||||||
|
interface_formal_port_t&res,
|
||||||
|
bool emit_errors);
|
||||||
|
|
||||||
#endif /* IVL_Module_H */
|
#endif /* IVL_Module_H */
|
||||||
|
|
|
||||||
44
PDelays.cc
44
PDelays.cc
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1999-2025 Stephen Williams (steve@icarus.com)
|
* Copyright (c) 1999-2026 Stephen Williams (steve@icarus.com)
|
||||||
*
|
*
|
||||||
* This source code is free software; you can redistribute it
|
* This source code is free software; you can redistribute it
|
||||||
* and/or modify it in source code form under the terms of the GNU
|
* and/or modify it in source code form under the terms of the GNU
|
||||||
|
|
@ -130,10 +130,11 @@ static NetExpr* make_delay_nets(Design*des, NetScope*scope, NetExpr*expr)
|
||||||
return expr;
|
return expr;
|
||||||
}
|
}
|
||||||
|
|
||||||
static NetExpr* calc_decay_time(NetExpr *rise, NetExpr *fall)
|
static const NetExpr *calc_decay_time(const NetExpr *rise,
|
||||||
|
const NetExpr *fall)
|
||||||
{
|
{
|
||||||
const NetEConst *c_rise = dynamic_cast<NetEConst*>(rise);
|
const NetEConst *c_rise = dynamic_cast<const NetEConst*>(rise);
|
||||||
const NetEConst *c_fall = dynamic_cast<NetEConst*>(fall);
|
const NetEConst *c_fall = dynamic_cast<const NetEConst*>(fall);
|
||||||
if (c_rise && c_fall) {
|
if (c_rise && c_fall) {
|
||||||
if (c_rise->value() < c_fall->value()) return rise;
|
if (c_rise->value() < c_fall->value()) return rise;
|
||||||
else return fall;
|
else return fall;
|
||||||
|
|
@ -142,44 +143,43 @@ static NetExpr* calc_decay_time(NetExpr *rise, NetExpr *fall)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PDelays::eval_delays(Design*des, NetScope*scope,
|
void PDelays::eval_delays(Design*des, NetScope*scope, delay_exprs_t &delays,
|
||||||
NetExpr*&rise_time,
|
|
||||||
NetExpr*&fall_time,
|
|
||||||
NetExpr*&decay_time,
|
|
||||||
bool as_nets_flag) const
|
bool as_nets_flag) const
|
||||||
{
|
{
|
||||||
assert(scope);
|
assert(scope);
|
||||||
|
|
||||||
|
|
||||||
if (delay_[0]) {
|
if (delay_[0]) {
|
||||||
rise_time = calculate_val(des, scope, delay_[0]);
|
NetExpr *rise = calculate_val(des, scope, delay_[0]);
|
||||||
if (as_nets_flag)
|
if (as_nets_flag)
|
||||||
rise_time = make_delay_nets(des, scope, rise_time);
|
rise = make_delay_nets(des, scope, rise);
|
||||||
|
delays.rise = rise;
|
||||||
|
|
||||||
if (delay_[1]) {
|
if (delay_[1]) {
|
||||||
fall_time = calculate_val(des, scope, delay_[1]);
|
NetExpr *fall = calculate_val(des, scope, delay_[1]);
|
||||||
if (as_nets_flag)
|
if (as_nets_flag)
|
||||||
fall_time = make_delay_nets(des, scope, fall_time);
|
fall = make_delay_nets(des, scope, fall);
|
||||||
|
delays.fall = fall;
|
||||||
|
|
||||||
if (delay_[2]) {
|
if (delay_[2]) {
|
||||||
decay_time = calculate_val(des, scope, delay_[2]);
|
NetExpr *decay = calculate_val(des, scope, delay_[2]);
|
||||||
if (as_nets_flag)
|
if (as_nets_flag)
|
||||||
decay_time = make_delay_nets(des, scope,
|
decay = make_delay_nets(des, scope, decay);
|
||||||
decay_time);
|
delays.decay = decay;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// If this is zero then we need to do the min()
|
// If this is zero then we need to do the min()
|
||||||
// at run time.
|
// at run time.
|
||||||
decay_time = calc_decay_time(rise_time, fall_time);
|
delays.decay = calc_decay_time(delays.rise,
|
||||||
|
delays.fall);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
assert(delay_[2] == 0);
|
assert(delay_[2] == 0);
|
||||||
fall_time = rise_time;
|
delays.fall = delays.rise;
|
||||||
decay_time = rise_time;
|
delays.decay = delays.rise;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
rise_time = 0;
|
delays.rise = nullptr;
|
||||||
fall_time = 0;
|
delays.fall = nullptr;
|
||||||
decay_time = 0;
|
delays.decay = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef IVL_PDelays_H
|
#ifndef IVL_PDelays_H
|
||||||
#define IVL_PDelays_H
|
#define IVL_PDelays_H
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1999-2021 Stephen Williams (steve@icarus.com)
|
* Copyright (c) 1999-2026 Stephen Williams (steve@icarus.com)
|
||||||
*
|
*
|
||||||
* This source code is free software; you can redistribute it
|
* This source code is free software; you can redistribute it
|
||||||
* and/or modify it in source code form under the terms of the GNU
|
* and/or modify it in source code form under the terms of the GNU
|
||||||
|
|
@ -27,6 +27,7 @@ class Design;
|
||||||
class NetScope;
|
class NetScope;
|
||||||
class NetExpr;
|
class NetExpr;
|
||||||
class PExpr;
|
class PExpr;
|
||||||
|
struct delay_exprs_t;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Various PForm objects can carry delays. These delays include rise,
|
* Various PForm objects can carry delays. These delays include rise,
|
||||||
|
|
@ -46,10 +47,7 @@ class PDelays {
|
||||||
|
|
||||||
unsigned delay_count() const;
|
unsigned delay_count() const;
|
||||||
|
|
||||||
void eval_delays(Design*des, NetScope*scope,
|
void eval_delays(Design*des, NetScope*scope, delay_exprs_t &delays,
|
||||||
NetExpr*&rise_time,
|
|
||||||
NetExpr*&fall_time,
|
|
||||||
NetExpr*&decay_time,
|
|
||||||
bool as_nets_flag =false) const;
|
bool as_nets_flag =false) const;
|
||||||
|
|
||||||
void dump_delays(std::ostream&out) const;
|
void dump_delays(std::ostream&out) const;
|
||||||
|
|
|
||||||
41
PExpr.cc
41
PExpr.cc
|
|
@ -108,6 +108,16 @@ PEAssignPattern::~PEAssignPattern()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool PEAssignPattern::has_aa_term(Design*des, NetScope*scope) const
|
||||||
|
{
|
||||||
|
bool flag = false;
|
||||||
|
for (const auto *parm : parms_) {
|
||||||
|
if (parm)
|
||||||
|
flag = parm->has_aa_term(des, scope) || flag;
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
PEBinary::PEBinary(char op, PExpr*l, PExpr*r)
|
PEBinary::PEBinary(char op, PExpr*l, PExpr*r)
|
||||||
: op_(op), left_(l), right_(r)
|
: op_(op), left_(l), right_(r)
|
||||||
{
|
{
|
||||||
|
|
@ -261,26 +271,47 @@ PECallFunction::PECallFunction(perm_string n, const list<named_pexpr_t> &parms)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PECallFunction::PECallFunction(PExpr* chain_prefix, const pform_name_t &method,
|
||||||
|
const vector<named_pexpr_t> &parms)
|
||||||
|
: path_(method), parms_(parms), chain_prefix_(chain_prefix), is_overridden_(false)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
PECallFunction::PECallFunction(PExpr* chain_prefix, const pform_name_t &method,
|
||||||
|
const list<named_pexpr_t> &parms)
|
||||||
|
: path_(method), parms_(parms.begin(), parms.end()),
|
||||||
|
chain_prefix_(chain_prefix), is_overridden_(false)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
PECallFunction::~PECallFunction()
|
PECallFunction::~PECallFunction()
|
||||||
{
|
{
|
||||||
|
delete chain_prefix_;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PECallFunction::declare_implicit_nets(LexicalScope*scope, NetNet::Type type)
|
void PECallFunction::declare_implicit_nets(LexicalScope*scope, NetNet::Type type)
|
||||||
{
|
{
|
||||||
|
if (chain_prefix_) {
|
||||||
|
chain_prefix_->declare_implicit_nets(scope, type);
|
||||||
|
}
|
||||||
for (const auto &parm : parms_) {
|
for (const auto &parm : parms_) {
|
||||||
if (parm.parm)
|
if (parm.parm) {
|
||||||
parm.parm->declare_implicit_nets(scope, type);
|
parm.parm->declare_implicit_nets(scope, type);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PECallFunction::has_aa_term(Design*des, NetScope*scope) const
|
bool PECallFunction::has_aa_term(Design*des, NetScope*scope) const
|
||||||
{
|
{
|
||||||
bool flag = false;
|
if (chain_prefix_ && chain_prefix_->has_aa_term(des, scope)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
for (const auto &parm : parms_) {
|
for (const auto &parm : parms_) {
|
||||||
if (parm.parm)
|
if (parm.parm && parm.parm->has_aa_term(des, scope)) {
|
||||||
flag |= parm.parm->has_aa_term(des, scope);
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return flag;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
PEConcat::PEConcat(const list<PExpr*>&p, PExpr*r)
|
PEConcat::PEConcat(const list<PExpr*>&p, PExpr*r)
|
||||||
|
|
|
||||||
77
PExpr.h
77
PExpr.h
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef IVL_PExpr_H
|
#ifndef IVL_PExpr_H
|
||||||
#define IVL_PExpr_H
|
#define IVL_PExpr_H
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1998-2025 Stephen Williams <steve@icarus.com>
|
* Copyright (c) 1998-2026 Stephen Williams <steve@icarus.com>
|
||||||
* Copyright CERN 2013 / Stephen Williams (steve@icarus.com)
|
* Copyright CERN 2013 / Stephen Williams (steve@icarus.com)
|
||||||
*
|
*
|
||||||
* This source code is free software; you can redistribute it
|
* This source code is free software; you can redistribute it
|
||||||
|
|
@ -37,6 +37,7 @@ class NetExpr;
|
||||||
class NetScope;
|
class NetScope;
|
||||||
class PPackage;
|
class PPackage;
|
||||||
struct symbol_search_results;
|
struct symbol_search_results;
|
||||||
|
class netclass_t;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The PExpr class hierarchy supports the description of
|
* The PExpr class hierarchy supports the description of
|
||||||
|
|
@ -208,6 +209,8 @@ class PEAssignPattern : public PExpr {
|
||||||
|
|
||||||
void dump(std::ostream&) const override;
|
void dump(std::ostream&) const override;
|
||||||
|
|
||||||
|
virtual bool has_aa_term(Design*des, NetScope*scope) const override;
|
||||||
|
|
||||||
virtual unsigned test_width(Design*des, NetScope*scope, width_mode_t&mode) override;
|
virtual unsigned test_width(Design*des, NetScope*scope, width_mode_t&mode) override;
|
||||||
virtual NetExpr*elaborate_expr(Design*des, NetScope*scope,
|
virtual NetExpr*elaborate_expr(Design*des, NetScope*scope,
|
||||||
ivl_type_t type, unsigned flags) const override;
|
ivl_type_t type, unsigned flags) const override;
|
||||||
|
|
@ -488,18 +491,12 @@ class PEIdent : public PExpr {
|
||||||
const NetScope*found_in,
|
const NetScope*found_in,
|
||||||
ivl_type_t par_type,
|
ivl_type_t par_type,
|
||||||
unsigned expr_wid) const;
|
unsigned expr_wid) const;
|
||||||
NetExpr*elaborate_expr_param_idx_up_(Design*des,
|
NetExpr*elaborate_expr_param_idx_up_do_(Design*des,
|
||||||
NetScope*scope,
|
NetScope*scope,
|
||||||
const NetExpr*par,
|
const NetExpr*par,
|
||||||
const NetScope*found_in,
|
const NetScope*found_in,
|
||||||
ivl_type_t par_type,
|
ivl_type_t par_type,
|
||||||
bool need_const) const;
|
bool up, bool need_const) const;
|
||||||
NetExpr*elaborate_expr_param_idx_do_(Design*des,
|
|
||||||
NetScope*scope,
|
|
||||||
const NetExpr*par,
|
|
||||||
const NetScope*found_in,
|
|
||||||
ivl_type_t par_type,
|
|
||||||
bool need_const) const;
|
|
||||||
NetExpr*elaborate_expr_net(Design*des,
|
NetExpr*elaborate_expr_net(Design*des,
|
||||||
NetScope*scope,
|
NetScope*scope,
|
||||||
NetNet*net,
|
NetNet*net,
|
||||||
|
|
@ -517,16 +514,11 @@ class PEIdent : public PExpr {
|
||||||
NetESignal*net,
|
NetESignal*net,
|
||||||
NetScope*found,
|
NetScope*found,
|
||||||
unsigned expr_wid) const;
|
unsigned expr_wid) const;
|
||||||
NetExpr*elaborate_expr_net_idx_up_(Design*des,
|
NetExpr*elaborate_expr_net_idx_up_do_(Design*des,
|
||||||
NetScope*scope,
|
NetScope*scope,
|
||||||
NetESignal*net,
|
NetESignal*net,
|
||||||
NetScope*found,
|
NetScope*found,
|
||||||
bool need_const) const;
|
bool up, bool need_const) const;
|
||||||
NetExpr*elaborate_expr_net_idx_do_(Design*des,
|
|
||||||
NetScope*scope,
|
|
||||||
NetESignal*net,
|
|
||||||
NetScope*found,
|
|
||||||
bool need_const) const;
|
|
||||||
NetExpr*elaborate_expr_net_bit_(Design*des,
|
NetExpr*elaborate_expr_net_bit_(Design*des,
|
||||||
NetScope*scope,
|
NetScope*scope,
|
||||||
NetESignal*net,
|
NetESignal*net,
|
||||||
|
|
@ -690,12 +682,16 @@ class PEString : public PExpr {
|
||||||
virtual unsigned test_width(Design*des, NetScope*scope,
|
virtual unsigned test_width(Design*des, NetScope*scope,
|
||||||
width_mode_t&mode) override;
|
width_mode_t&mode) override;
|
||||||
|
|
||||||
virtual NetEConst*elaborate_expr(Design*des, NetScope*scope,
|
virtual NetExpr*elaborate_expr(Design*des, NetScope*scope,
|
||||||
ivl_type_t type, unsigned flags) const override;
|
ivl_type_t type, unsigned flags) const override;
|
||||||
|
|
||||||
virtual NetEConst*elaborate_expr(Design*des, NetScope*,
|
virtual NetEConst*elaborate_expr(Design*des, NetScope*,
|
||||||
unsigned expr_wid, unsigned) const override;
|
unsigned expr_wid, unsigned) const override;
|
||||||
|
|
||||||
|
NetExpr *elaborate_expr_uarray_(Design *des, NetScope *scope,
|
||||||
|
const netuarray_t *uarray_type,
|
||||||
|
const std::vector<netrange_t> &dims,
|
||||||
|
unsigned int cur_dim) const;
|
||||||
private:
|
private:
|
||||||
char*text_;
|
char*text_;
|
||||||
};
|
};
|
||||||
|
|
@ -924,8 +920,18 @@ class PECallFunction : public PExpr {
|
||||||
explicit PECallFunction(const pform_name_t &n, const std::list<named_pexpr_t> &parms);
|
explicit PECallFunction(const pform_name_t &n, const std::list<named_pexpr_t> &parms);
|
||||||
explicit PECallFunction(perm_string n, const std::list<named_pexpr_t> &parms);
|
explicit PECallFunction(perm_string n, const std::list<named_pexpr_t> &parms);
|
||||||
|
|
||||||
|
// SystemVerilog: prefix().method(args) — prefix elaborates to a class handle.
|
||||||
|
explicit PECallFunction(PExpr* chain_prefix, const pform_name_t &method,
|
||||||
|
const std::vector<named_pexpr_t> &parms);
|
||||||
|
explicit PECallFunction(PExpr* chain_prefix, const pform_name_t &method,
|
||||||
|
const std::list<named_pexpr_t> &parms);
|
||||||
|
|
||||||
~PECallFunction() override;
|
~PECallFunction() override;
|
||||||
|
|
||||||
|
// For chained-call resolution (path is only the final method name).
|
||||||
|
const pform_scoped_name_t& peek_path(void) const { return path_; }
|
||||||
|
const PExpr* peek_chain_prefix(void) const { return chain_prefix_; }
|
||||||
|
|
||||||
virtual void dump(std::ostream &) const override;
|
virtual void dump(std::ostream &) const override;
|
||||||
|
|
||||||
virtual void declare_implicit_nets(LexicalScope*scope, NetNet::Type type) override;
|
virtual void declare_implicit_nets(LexicalScope*scope, NetNet::Type type) override;
|
||||||
|
|
@ -944,6 +950,8 @@ class PECallFunction : public PExpr {
|
||||||
private:
|
private:
|
||||||
pform_scoped_name_t path_;
|
pform_scoped_name_t path_;
|
||||||
std::vector<named_pexpr_t> parms_;
|
std::vector<named_pexpr_t> parms_;
|
||||||
|
// If non-null, this call is prefix().tail_name(...) (SV method chain).
|
||||||
|
PExpr* chain_prefix_ = nullptr;
|
||||||
|
|
||||||
// For system functions.
|
// For system functions.
|
||||||
bool is_overridden_;
|
bool is_overridden_;
|
||||||
|
|
@ -981,7 +989,26 @@ class PECallFunction : public PExpr {
|
||||||
unsigned elaborate_arguments_(Design*des, NetScope*scope,
|
unsigned elaborate_arguments_(Design*des, NetScope*scope,
|
||||||
const NetFuncDef*def, bool need_const,
|
const NetFuncDef*def, bool need_const,
|
||||||
std::vector<NetExpr*>&parms,
|
std::vector<NetExpr*>&parms,
|
||||||
unsigned parm_off) const;
|
unsigned parm_off,
|
||||||
|
const std::vector<named_pexpr_t>*src_parms = nullptr) const;
|
||||||
|
|
||||||
|
NetExpr* elaborate_class_method_net_(Design*des, NetScope*scope,
|
||||||
|
NetNet*net, const netclass_t*class_type,
|
||||||
|
perm_string method_name,
|
||||||
|
const std::vector<named_pexpr_t>*src_parms) const;
|
||||||
|
|
||||||
|
NetExpr* elaborate_class_method_net_this_(Design*des, NetScope*scope,
|
||||||
|
NetExpr* this_expr,
|
||||||
|
const netclass_t*class_type,
|
||||||
|
perm_string method_name,
|
||||||
|
const std::vector<named_pexpr_t>*src_parms) const;
|
||||||
|
|
||||||
|
NetExpr* elaborate_expr_method_chained_(Design*des, NetScope*scope,
|
||||||
|
symbol_search_results&search_results) const;
|
||||||
|
|
||||||
|
NetExpr* elaborate_expr_chain_(Design*des, NetScope*scope, unsigned flags) const;
|
||||||
|
|
||||||
|
unsigned test_width_chain_(Design*des, NetScope*scope, width_mode_t&mode);
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
41
PGate.cc
41
PGate.cc
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1999-2025 Stephen Williams (steve@icarus.com)
|
* Copyright (c) 1999-2026 Stephen Williams (steve@icarus.com)
|
||||||
*
|
*
|
||||||
* This source code is free software; you can redistribute it
|
* This source code is free software; you can redistribute it
|
||||||
* and/or modify it in source code form under the terms of the GNU
|
* and/or modify it in source code form under the terms of the GNU
|
||||||
|
|
@ -41,29 +41,23 @@ void PGate::set_pins_(list<PExpr*>*pins)
|
||||||
}
|
}
|
||||||
|
|
||||||
PGate::PGate(perm_string name, list<PExpr*>*pins, const list<PExpr*>*del)
|
PGate::PGate(perm_string name, list<PExpr*>*pins, const list<PExpr*>*del)
|
||||||
: name_(name), pins_(pins? pins->size() : 0), ranges_(0)
|
: name_(name), pins_(pins? pins->size() : 0), ranges_(nullptr)
|
||||||
{
|
{
|
||||||
if (pins) set_pins_(pins);
|
if (pins) set_pins_(pins);
|
||||||
if (del) delay_.set_delays(del);
|
if (del) delay_.set_delays(del);
|
||||||
str0_ = IVL_DR_STRONG;
|
|
||||||
str1_ = IVL_DR_STRONG;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PGate::PGate(perm_string name, list<PExpr*>*pins, PExpr*del)
|
PGate::PGate(perm_string name, list<PExpr*>*pins, PExpr*del)
|
||||||
: name_(name), pins_(pins? pins->size() : 0), ranges_(0)
|
: name_(name), pins_(pins? pins->size() : 0), ranges_(nullptr)
|
||||||
{
|
{
|
||||||
if (pins) set_pins_(pins);
|
if (pins) set_pins_(pins);
|
||||||
if (del) delay_.set_delay(del);
|
if (del) delay_.set_delay(del);
|
||||||
str0_ = IVL_DR_STRONG;
|
|
||||||
str1_ = IVL_DR_STRONG;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PGate::PGate(perm_string name, list<PExpr*>*pins)
|
PGate::PGate(perm_string name, list<PExpr*>*pins)
|
||||||
: name_(name), pins_(pins? pins->size() : 0), ranges_(0)
|
: name_(name), pins_(pins? pins->size() : 0), ranges_(nullptr)
|
||||||
{
|
{
|
||||||
if (pins) set_pins_(pins);
|
if (pins) set_pins_(pins);
|
||||||
str0_ = IVL_DR_STRONG;
|
|
||||||
str1_ = IVL_DR_STRONG;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PGate::~PGate()
|
PGate::~PGate()
|
||||||
|
|
@ -76,24 +70,14 @@ void PGate::set_ranges(list<pform_range_t>*ranges)
|
||||||
ranges_ = ranges;
|
ranges_ = ranges;
|
||||||
}
|
}
|
||||||
|
|
||||||
ivl_drive_t PGate::strength0() const
|
drive_strength_t PGate::strength() const
|
||||||
{
|
{
|
||||||
return str0_;
|
return strength_;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PGate::strength0(ivl_drive_t s)
|
void PGate::strength(const drive_strength_t &str)
|
||||||
{
|
{
|
||||||
str0_ = s;
|
strength_ = str;
|
||||||
}
|
|
||||||
|
|
||||||
ivl_drive_t PGate::strength1() const
|
|
||||||
{
|
|
||||||
return str1_;
|
|
||||||
}
|
|
||||||
|
|
||||||
void PGate::strength1(ivl_drive_t s)
|
|
||||||
{
|
|
||||||
str1_ = s;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void PGate::elaborate_scope(Design*, NetScope*) const
|
void PGate::elaborate_scope(Design*, NetScope*) const
|
||||||
|
|
@ -109,15 +93,10 @@ void PGate::elaborate_scope(Design*, NetScope*) const
|
||||||
* numbers of expressions.
|
* numbers of expressions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void PGate::eval_delays(Design*des, NetScope*scope,
|
void PGate::eval_delays(Design*des, NetScope*scope, delay_exprs_t &delays,
|
||||||
NetExpr*&rise_expr,
|
|
||||||
NetExpr*&fall_expr,
|
|
||||||
NetExpr*&decay_expr,
|
|
||||||
bool as_net_flag) const
|
bool as_net_flag) const
|
||||||
{
|
{
|
||||||
delay_.eval_delays(des, scope,
|
delay_.eval_delays(des, scope, delays, as_net_flag);
|
||||||
rise_expr, fall_expr, decay_expr,
|
|
||||||
as_net_flag);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned PGate::delay_count() const
|
unsigned PGate::delay_count() const
|
||||||
|
|
|
||||||
30
PGate.h
30
PGate.h
|
|
@ -31,6 +31,8 @@
|
||||||
class PExpr;
|
class PExpr;
|
||||||
class PUdp;
|
class PUdp;
|
||||||
class Module;
|
class Module;
|
||||||
|
struct delay_exprs_t;
|
||||||
|
struct drive_strength_t;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* A PGate represents a Verilog gate. The gate has a name and other
|
* A PGate represents a Verilog gate. The gate has a name and other
|
||||||
|
|
@ -66,10 +68,7 @@ class PGate : public PNamedItem {
|
||||||
|
|
||||||
// This evaluates the delays as far as possible, but returns
|
// This evaluates the delays as far as possible, but returns
|
||||||
// an expression, and do not signal errors.
|
// an expression, and do not signal errors.
|
||||||
void eval_delays(Design*des, NetScope*scope,
|
void eval_delays(Design*des, NetScope*scope, delay_exprs_t &delays,
|
||||||
NetExpr*&rise_time,
|
|
||||||
NetExpr*&fall_time,
|
|
||||||
NetExpr*&decay_time,
|
|
||||||
bool as_net_flag =false) const;
|
bool as_net_flag =false) const;
|
||||||
|
|
||||||
unsigned delay_count() const;
|
unsigned delay_count() const;
|
||||||
|
|
@ -77,11 +76,9 @@ class PGate : public PNamedItem {
|
||||||
unsigned pin_count() const { return pins_.size(); }
|
unsigned pin_count() const { return pins_.size(); }
|
||||||
PExpr*pin(unsigned idx) const { return pins_[idx]; }
|
PExpr*pin(unsigned idx) const { return pins_[idx]; }
|
||||||
|
|
||||||
ivl_drive_t strength0() const;
|
drive_strength_t strength() const;
|
||||||
ivl_drive_t strength1() const;
|
|
||||||
|
|
||||||
void strength0(ivl_drive_t);
|
void strength(const drive_strength_t &str);
|
||||||
void strength1(ivl_drive_t);
|
|
||||||
|
|
||||||
std::map<perm_string,PExpr*> attributes;
|
std::map<perm_string,PExpr*> attributes;
|
||||||
|
|
||||||
|
|
@ -109,7 +106,7 @@ class PGate : public PNamedItem {
|
||||||
|
|
||||||
std::list<pform_range_t>*ranges_;
|
std::list<pform_range_t>*ranges_;
|
||||||
|
|
||||||
ivl_drive_t str0_, str1_;
|
drive_strength_t strength_;
|
||||||
|
|
||||||
void set_pins_(std::list<PExpr*>*pins);
|
void set_pins_(std::list<PExpr*>*pins);
|
||||||
|
|
||||||
|
|
@ -133,7 +130,9 @@ class PGAssign : public PGate {
|
||||||
virtual void elaborate(Design*des, NetScope*scope) const override;
|
virtual void elaborate(Design*des, NetScope*scope) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void elaborate_unpacked_array_(Design*des, NetScope*scope, NetNet*lval) const;
|
void elaborate_unpacked_array_(Design*des, NetScope*scope, NetNet*lval,
|
||||||
|
const drive_strength_t &drive,
|
||||||
|
const delay_exprs_t &delays) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -236,11 +235,20 @@ class PGModule : public PGate {
|
||||||
unsigned nparms_;
|
unsigned nparms_;
|
||||||
|
|
||||||
friend class delayed_elaborate_scope_mod_instances;
|
friend class delayed_elaborate_scope_mod_instances;
|
||||||
void elaborate_mod_(Design*, Module*mod, NetScope*scope) const;
|
void elaborate_mod_(Design*, const Module*mod, NetScope*scope) const;
|
||||||
void elaborate_udp_(Design*, PUdp *udp, NetScope*scope) const;
|
void elaborate_udp_(Design*, PUdp *udp, NetScope*scope) const;
|
||||||
void elaborate_scope_mod_(Design*des, Module*mod, NetScope*sc) const;
|
void elaborate_scope_mod_(Design*des, Module*mod, NetScope*sc) const;
|
||||||
void elaborate_scope_mod_instances_(Design*des, Module*mod, NetScope*sc) const;
|
void elaborate_scope_mod_instances_(Design*des, Module*mod, NetScope*sc) const;
|
||||||
bool elaborate_sig_mod_(Design*des, NetScope*scope, const Module*mod) const;
|
bool elaborate_sig_mod_(Design*des, NetScope*scope, const Module*mod) const;
|
||||||
|
bool bind_interface_ports_(Design*des, const Module*mod,
|
||||||
|
NetScope*parent_scope, NetScope*instance_scope,
|
||||||
|
const std::vector<PExpr*>&pins,
|
||||||
|
const std::vector<bool>&pins_fromwc) const;
|
||||||
|
bool match_module_ports_(Design*des, const Module*mod,
|
||||||
|
NetScope*scope,
|
||||||
|
std::vector<PExpr*>&pins,
|
||||||
|
std::vector<bool>&pins_fromwc,
|
||||||
|
std::vector<bool>&pins_is_explicitly_not_connected) const;
|
||||||
// Not currently used.
|
// Not currently used.
|
||||||
#if 0
|
#if 0
|
||||||
bool elaborate_sig_udp_(Design*des, NetScope*scope, PUdp*udp) const;
|
bool elaborate_sig_udp_(Design*des, NetScope*scope, PUdp*udp) const;
|
||||||
|
|
|
||||||
|
|
@ -26,10 +26,12 @@
|
||||||
# include <list>
|
# include <list>
|
||||||
# include <map>
|
# include <map>
|
||||||
# include <valarray>
|
# include <valarray>
|
||||||
|
# include <vector>
|
||||||
# include "pform_types.h"
|
# include "pform_types.h"
|
||||||
|
|
||||||
class Design;
|
class Design;
|
||||||
class NetScope;
|
class NetScope;
|
||||||
|
class PClass;
|
||||||
class PExpr;
|
class PExpr;
|
||||||
class PFunction;
|
class PFunction;
|
||||||
class PProcess;
|
class PProcess;
|
||||||
|
|
@ -92,9 +94,11 @@ class PGenerate : public PNamedItem, public LexicalScope {
|
||||||
std::list<PGate*> gates;
|
std::list<PGate*> gates;
|
||||||
void add_gate(PGate*);
|
void add_gate(PGate*);
|
||||||
|
|
||||||
// Tasks instantiated within this scheme.
|
// Definitions instantiated within this scheme.
|
||||||
std::map<perm_string,PTask*> tasks;
|
std::map<perm_string,PTask*> tasks;
|
||||||
std::map<perm_string,PFunction*>funcs;
|
std::map<perm_string,PFunction*>funcs;
|
||||||
|
std::map<perm_string,PClass*> classes;
|
||||||
|
std::vector<PClass*> classes_lexical;
|
||||||
|
|
||||||
// Generate schemes can contain further generate schemes.
|
// Generate schemes can contain further generate schemes.
|
||||||
std::list<PGenerate*> generate_schemes;
|
std::list<PGenerate*> generate_schemes;
|
||||||
|
|
|
||||||
4
PScope.h
4
PScope.h
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef IVL_PScope_H
|
#ifndef IVL_PScope_H
|
||||||
#define IVL_PScope_H
|
#define IVL_PScope_H
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2008-2025 Stephen Williams (steve@icarus.com)
|
* Copyright (c) 2008-2026 Stephen Williams (steve@icarus.com)
|
||||||
*
|
*
|
||||||
* This source code is free software; you can redistribute it
|
* This source code is free software; you can redistribute it
|
||||||
* and/or modify it in source code form under the terms of the GNU
|
* and/or modify it in source code form under the terms of the GNU
|
||||||
|
|
@ -121,6 +121,8 @@ class LexicalScope {
|
||||||
bool overridable;
|
bool overridable;
|
||||||
// Whether the parameter is a type parameter
|
// Whether the parameter is a type parameter
|
||||||
bool type_flag = false;
|
bool type_flag = false;
|
||||||
|
// Type restriction for a type parameter
|
||||||
|
type_restrict_t type_restrict;
|
||||||
// The lexical position of the declaration
|
// The lexical position of the declaration
|
||||||
unsigned lexical_pos = 0;
|
unsigned lexical_pos = 0;
|
||||||
|
|
||||||
|
|
|
||||||
28
Statement.h
28
Statement.h
|
|
@ -40,6 +40,8 @@ class NetCAssign;
|
||||||
class NetDeassign;
|
class NetDeassign;
|
||||||
class NetForce;
|
class NetForce;
|
||||||
class NetScope;
|
class NetScope;
|
||||||
|
class NetNet;
|
||||||
|
class netdarray_t;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The PProcess is the root of a behavioral process. Each process gets
|
* The PProcess is the root of a behavioral process. Each process gets
|
||||||
|
|
@ -261,16 +263,42 @@ class PCallTask : public Statement {
|
||||||
perm_string method_name,
|
perm_string method_name,
|
||||||
const char *sys_task_name,
|
const char *sys_task_name,
|
||||||
const std::vector<perm_string> &parm_names = {}) const;
|
const std::vector<perm_string> &parm_names = {}) const;
|
||||||
|
NetProc*elaborate_sys_task_property_method_(Design*des, NetScope*scope,
|
||||||
|
NetNet*net, int property_idx,
|
||||||
|
perm_string method_name,
|
||||||
|
const char *sys_task_name,
|
||||||
|
const std::vector<perm_string> &parm_names = {}) const;
|
||||||
NetProc*elaborate_queue_method_(Design*des, NetScope*scope,
|
NetProc*elaborate_queue_method_(Design*des, NetScope*scope,
|
||||||
NetNet*net,
|
NetNet*net,
|
||||||
perm_string method_name,
|
perm_string method_name,
|
||||||
const char *sys_task_name,
|
const char *sys_task_name,
|
||||||
const std::vector<perm_string> &parm_names) const;
|
const std::vector<perm_string> &parm_names) const;
|
||||||
|
NetProc*elaborate_queue_property_method_(Design*des, NetScope*scope,
|
||||||
|
NetNet*net, int property_idx,
|
||||||
|
perm_string method_name,
|
||||||
|
const char *sys_task_name,
|
||||||
|
const std::vector<perm_string> &parm_names) const;
|
||||||
NetProc*elaborate_method_func_(NetScope*scope,
|
NetProc*elaborate_method_func_(NetScope*scope,
|
||||||
NetNet*net,
|
NetNet*net,
|
||||||
ivl_type_t type,
|
ivl_type_t type,
|
||||||
perm_string method_name,
|
perm_string method_name,
|
||||||
const char*sys_task_name) const;
|
const char*sys_task_name) const;
|
||||||
|
NetProc*elaborate_method_property_func_(NetScope*scope,
|
||||||
|
NetNet*net, int property_idx,
|
||||||
|
ivl_type_t type,
|
||||||
|
perm_string method_name,
|
||||||
|
const char*sys_task_name) const;
|
||||||
|
NetProc*elaborate_queue_method_expr_(Design*des, NetScope*scope,
|
||||||
|
NetExpr*queue_base,
|
||||||
|
const netdarray_t*use_darray,
|
||||||
|
perm_string method_name,
|
||||||
|
const char *sys_task_name,
|
||||||
|
const std::vector<perm_string> &parm_names) const;
|
||||||
|
NetProc*elaborate_method_func_expr_(NetScope*scope,
|
||||||
|
NetExpr*queue_base,
|
||||||
|
ivl_type_t type,
|
||||||
|
perm_string method_name,
|
||||||
|
const char*sys_task_name) const;
|
||||||
bool test_task_calls_ok_(Design*des, const NetScope*scope) const;
|
bool test_task_calls_ok_(Design*des, const NetScope*scope) const;
|
||||||
|
|
||||||
PPackage*package_;
|
PPackage*package_;
|
||||||
|
|
|
||||||
|
|
@ -1,392 +1,27 @@
|
||||||
|
# generated automatically by aclocal 1.18.1 -*- Autoconf -*-
|
||||||
|
|
||||||
# AX_ENABLE_SUFFIX
|
# Copyright (C) 1996-2025 Free Software Foundation, Inc.
|
||||||
# ----------------
|
|
||||||
# Create the configure option --enable-suffix[=suffix] to generate suffix
|
|
||||||
# strings for the installed commands. This allows for shared installs of
|
|
||||||
# different builds. Remember to change the default suffix string to some
|
|
||||||
# value appropriate for the current version.
|
|
||||||
AC_DEFUN([AX_ENABLE_SUFFIX],
|
|
||||||
[AC_ARG_ENABLE([suffix],[AS_HELP_STRING([--enable-suffix],
|
|
||||||
[Use/set the installation command suffix])],
|
|
||||||
[true],[enable_suffix=no])
|
|
||||||
if test X$enable_suffix = Xyes; then
|
|
||||||
install_suffix='-dev'
|
|
||||||
elif test X$enable_suffix = Xno; then
|
|
||||||
install_suffix=''
|
|
||||||
else
|
|
||||||
install_suffix="$enable_suffix"
|
|
||||||
fi
|
|
||||||
AC_SUBST(install_suffix)
|
|
||||||
])# AX_ENABLE_SUFFIX
|
|
||||||
|
|
||||||
# _AX_C_UNDERSCORES_MATCH_IFELSE(PATTERN, ACTION-IF-MATCH, ACTION-IF-NOMATCH)
|
# This file is free software; the Free Software Foundation
|
||||||
# ------------------------------
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
# Sub-macro for AX_C_UNDERSCORES_LEADING and AX_C_UNDERSCORES_TRAILING.
|
# with or without modifications, as long as this notice is preserved.
|
||||||
# Unwarranted assumptions:
|
|
||||||
# - the object file produced by AC_COMPILE_IFELSE is called
|
|
||||||
# "conftest.$ac_objext"
|
|
||||||
# - the nm(1) utility or an equivalent is available, and its name
|
|
||||||
# is defined by the $NM variable.
|
|
||||||
AC_DEFUN([_AX_C_UNDERSCORES_MATCH_IF],
|
|
||||||
[AC_COMPILE_IFELSE([AC_LANG_SOURCE([void underscore(void){}])],
|
|
||||||
[AS_IF([$NM conftest.$ac_objext|grep $1 >/dev/null 2>/dev/null],[$2],[$3])],
|
|
||||||
[AC_MSG_ERROR([underscore test crashed])]
|
|
||||||
)])
|
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||||
|
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
# PARTICULAR PURPOSE.
|
||||||
|
|
||||||
# AX_C_UNDERSCORES_LEADING
|
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
|
||||||
# ---------------------------------
|
m4_include([m4/_ac_am_config_header_hook.m4])
|
||||||
# Check if symbol names in object files produced by C compiler have
|
m4_include([m4/_ax_c_underscores_match_if.m4])
|
||||||
# leading underscores. Define NEED_LU if so.
|
m4_include([m4/ax_c99_strtod.m4])
|
||||||
AC_DEFUN([AX_C_UNDERSCORES_LEADING],
|
m4_include([m4/ax_c_picflag.m4])
|
||||||
[AC_CACHE_CHECK([for leading underscores], ax_cv_c_underscores_leading,
|
m4_include([m4/ax_c_underscores_leading.m4])
|
||||||
[_AX_C_UNDERSCORES_MATCH_IF([_underscore],
|
m4_include([m4/ax_c_underscores_trailing.m4])
|
||||||
[AS_VAR_SET(ax_cv_c_underscores_leading, yes)],
|
m4_include([m4/ax_cxx_compile_stdcxx.m4])
|
||||||
[AS_VAR_SET(ax_cv_c_underscores_leading, no)])])
|
m4_include([m4/ax_enable_suffix.m4])
|
||||||
if test $ax_cv_c_underscores_leading = yes -a "$CYGWIN" != "yes" -a "$MINGW32" != "yes"; then
|
m4_include([m4/ax_ld_extralibs.m4])
|
||||||
AC_DEFINE([NEED_LU], [1], [Symbol names in object files produced by C compiler have leading underscores.])
|
m4_include([m4/ax_ld_rdynamic.m4])
|
||||||
fi
|
m4_include([m4/ax_ld_sharedlib_opts.m4])
|
||||||
])# AX_C_UNDERSCORES_LEADING
|
m4_include([m4/ax_prog_cc_for_build.m4])
|
||||||
|
m4_include([m4/ax_win32.m4])
|
||||||
|
|
||||||
# AX_C_UNDERSCORES_TRAILING
|
|
||||||
# ---------------------------------
|
|
||||||
# Check if symbol names in object files produced by C compiler have
|
|
||||||
# trailing underscores. Define NEED_TU if so.
|
|
||||||
AC_DEFUN([AX_C_UNDERSCORES_TRAILING],
|
|
||||||
[AC_CACHE_CHECK([for trailing underscores], ax_cv_c_underscores_trailing,
|
|
||||||
[_AX_C_UNDERSCORES_MATCH_IF([underscore_],
|
|
||||||
[AS_VAR_SET(ax_cv_c_underscores_trailing, yes)],
|
|
||||||
[AS_VAR_SET(ax_cv_c_underscores_trailing, no)])])
|
|
||||||
if test $ax_cv_c_underscores_trailing = yes; then
|
|
||||||
AC_DEFINE([NEED_TU], [1], [Symbol names in object files produced by C compiler have trailing underscores.])
|
|
||||||
fi
|
|
||||||
])# AX_C_UNDERSCORES_TRAILING
|
|
||||||
|
|
||||||
# AX_WIN32
|
|
||||||
# --------
|
|
||||||
# Combined check for several flavors of Microsoft Windows so
|
|
||||||
# their "issues" can be dealt with
|
|
||||||
AC_DEFUN([AX_WIN32],
|
|
||||||
[AC_MSG_CHECKING([for Microsoft Windows])
|
|
||||||
AC_REQUIRE([AC_CANONICAL_HOST]) []dnl
|
|
||||||
case $host_os in
|
|
||||||
*cygwin*) MINGW32=no; WIN32=yes;;
|
|
||||||
|
|
||||||
*mingw*) MINGW32=yes; WIN32=yes;;
|
|
||||||
|
|
||||||
*) MINGW32=no; WIN32=no;;
|
|
||||||
esac
|
|
||||||
AC_SUBST(MINGW32)
|
|
||||||
AC_SUBST(WIN32)
|
|
||||||
AC_MSG_RESULT($WIN32)
|
|
||||||
if test $WIN32 = yes; then
|
|
||||||
AC_MSG_CHECKING([for MinGW])
|
|
||||||
AC_MSG_RESULT($MINGW32)
|
|
||||||
fi
|
|
||||||
])# AX_WIN32
|
|
||||||
|
|
||||||
# AX_LD_EXTRALIBS
|
|
||||||
# ---------------
|
|
||||||
# mingw needs to link with libiberty.a, but cygwin alone can't tolerate it
|
|
||||||
AC_DEFUN([AX_LD_EXTRALIBS],
|
|
||||||
[AC_MSG_CHECKING([for extra libs needed])
|
|
||||||
EXTRALIBS=
|
|
||||||
case "${host}" in
|
|
||||||
*-*-cygwin* )
|
|
||||||
if test "$MINGW32" = "yes"; then
|
|
||||||
EXTRALIBS="-liberty"
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
AC_SUBST(EXTRALIBS)
|
|
||||||
AC_MSG_RESULT($EXTRALIBS)
|
|
||||||
])# AX_LD_EXTRALIBS
|
|
||||||
|
|
||||||
# AX_LD_SHAREDLIB_OPTS
|
|
||||||
# --------------------
|
|
||||||
# linker options when building a shared library
|
|
||||||
AC_DEFUN([AX_LD_SHAREDLIB_OPTS],
|
|
||||||
[AC_MSG_CHECKING([for shared library link flag])
|
|
||||||
shared=-shared
|
|
||||||
case "${host}" in
|
|
||||||
*-*-cygwin*)
|
|
||||||
shared="-shared -Wl,--enable-auto-image-base"
|
|
||||||
;;
|
|
||||||
|
|
||||||
*-*-mingw*)
|
|
||||||
shared="-shared -Wl,--enable-auto-image-base"
|
|
||||||
;;
|
|
||||||
|
|
||||||
*-*-hpux*)
|
|
||||||
shared="-b"
|
|
||||||
;;
|
|
||||||
|
|
||||||
*-*-darwin1.[0123])
|
|
||||||
shared="-bundle -undefined dynamic_lookup"
|
|
||||||
;;
|
|
||||||
|
|
||||||
*-*-darwin*)
|
|
||||||
shared="-bundle -undefined dynamic_lookup -flat_namespace"
|
|
||||||
;;
|
|
||||||
|
|
||||||
*-*-solaris*)
|
|
||||||
if test ${using_sunpro_c} = 1
|
|
||||||
then
|
|
||||||
shared="-G"
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
AC_SUBST(shared)
|
|
||||||
AC_MSG_RESULT($shared)
|
|
||||||
])# AX_LD_SHAREDLIB_OPTS
|
|
||||||
|
|
||||||
# AX_C_PICFLAG
|
|
||||||
# ------------
|
|
||||||
# The -fPIC flag is used to tell the compiler to make position
|
|
||||||
# independent code. It is needed when making shared objects.
|
|
||||||
AC_DEFUN([AX_C_PICFLAG],
|
|
||||||
[AC_MSG_CHECKING([for flag to make position independent code])
|
|
||||||
PICFLAG=-fPIC
|
|
||||||
case "${host}" in
|
|
||||||
|
|
||||||
*-*-cygwin*)
|
|
||||||
PICFLAG=
|
|
||||||
;;
|
|
||||||
|
|
||||||
*-*-mingw*)
|
|
||||||
PICFLAG=
|
|
||||||
;;
|
|
||||||
|
|
||||||
*-*-hpux*)
|
|
||||||
PICFLAG=+z
|
|
||||||
;;
|
|
||||||
|
|
||||||
*-*-solaris*)
|
|
||||||
if test ${using_sunpro_c} = 1
|
|
||||||
then
|
|
||||||
PICFLAG=-G
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
AC_SUBST(PICFLAG)
|
|
||||||
AC_MSG_RESULT($PICFLAG)
|
|
||||||
])# AX_C_PICFLAG
|
|
||||||
|
|
||||||
# AX_LD_RDYNAMIC
|
|
||||||
# --------------
|
|
||||||
# The -rdynamic flag is used by iverilog when compiling the target,
|
|
||||||
# to know how to export symbols of the main program to loadable modules
|
|
||||||
# that are brought in by -ldl
|
|
||||||
AC_DEFUN([AX_LD_RDYNAMIC],
|
|
||||||
[AC_MSG_CHECKING([for -rdynamic compiler flag])
|
|
||||||
rdynamic=-rdynamic
|
|
||||||
case "${host}" in
|
|
||||||
|
|
||||||
*-*-netbsd*)
|
|
||||||
rdynamic="-Wl,--export-dynamic"
|
|
||||||
;;
|
|
||||||
|
|
||||||
*-*-openbsd*)
|
|
||||||
rdynamic="-Wl,--export-dynamic"
|
|
||||||
;;
|
|
||||||
|
|
||||||
*-*-solaris*)
|
|
||||||
rdynamic=""
|
|
||||||
;;
|
|
||||||
|
|
||||||
*-*-cygwin*)
|
|
||||||
rdynamic=""
|
|
||||||
;;
|
|
||||||
|
|
||||||
*-*-mingw*)
|
|
||||||
rdynamic=""
|
|
||||||
;;
|
|
||||||
|
|
||||||
*-*-hpux*)
|
|
||||||
rdynamic="-E"
|
|
||||||
;;
|
|
||||||
|
|
||||||
*-*-darwin*)
|
|
||||||
rdynamic="-Wl,-all_load"
|
|
||||||
strip_dynamic="-SX"
|
|
||||||
;;
|
|
||||||
|
|
||||||
esac
|
|
||||||
AC_SUBST(rdynamic)
|
|
||||||
AC_MSG_RESULT($rdynamic)
|
|
||||||
AC_SUBST(strip_dynamic)
|
|
||||||
# since we didn't tell them we're "checking", no good place to tell the answer
|
|
||||||
# AC_MSG_RESULT($strip_dynamic)
|
|
||||||
])# AX_LD_RDYNAMIC
|
|
||||||
|
|
||||||
|
|
||||||
# AX_C99_STRTOD
|
|
||||||
# -------------
|
|
||||||
AC_DEFUN([AX_C99_STRTOD],
|
|
||||||
[# On MinGW we need to jump through hoops to get a C99 compliant strtod().
|
|
||||||
# mingw-w64 doesn't need this, and the 64-bit version doesn't support it.
|
|
||||||
case "${host}" in
|
|
||||||
x86_64-w64-mingw32)
|
|
||||||
;;
|
|
||||||
aarch64-w64-mingw32)
|
|
||||||
;;
|
|
||||||
*-*-mingw32)
|
|
||||||
LDFLAGS+=" -Wl,--undefined=___strtod,--wrap,strtod,--defsym,___wrap_strtod=___strtod"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
])# AX_C99_STRTOD
|
|
||||||
|
|
||||||
# When config.status generates a header, we must update the stamp-h file.
|
|
||||||
# This file resides in the same directory as the config header
|
|
||||||
# that is generated. The stamp file name are based on the header name.
|
|
||||||
|
|
||||||
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
|
|
||||||
# loop where config.status creates the headers, so we can generate
|
|
||||||
# our stamp files there.
|
|
||||||
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
|
|
||||||
[
|
|
||||||
_config_header=$1
|
|
||||||
_stamp_name=stamp-`expr //$_config_header : '.*/\([[^./]]*\)\.[[^./]]*$'`-h
|
|
||||||
echo "timestamp for $_config_header" > `AS_DIRNAME(["$_config_header"])`/[]$_stamp_name
|
|
||||||
]) #_AC_AM_CONFIG_HEADER_HOOK
|
|
||||||
|
|
||||||
# ===========================================================================
|
|
||||||
# https://www.gnu.org/software/autoconf-archive/ax_prog_cc_for_build.html
|
|
||||||
# ===========================================================================
|
|
||||||
#
|
|
||||||
# SYNOPSIS
|
|
||||||
#
|
|
||||||
# AX_PROG_CC_FOR_BUILD
|
|
||||||
#
|
|
||||||
# DESCRIPTION
|
|
||||||
#
|
|
||||||
# This macro searches for a C compiler that generates native executables,
|
|
||||||
# that is a C compiler that surely is not a cross-compiler. This can be
|
|
||||||
# useful if you have to generate source code at compile-time like for
|
|
||||||
# example GCC does.
|
|
||||||
#
|
|
||||||
# The macro sets the CC_FOR_BUILD and CPP_FOR_BUILD macros to anything
|
|
||||||
# needed to compile or link (CC_FOR_BUILD) and preprocess (CPP_FOR_BUILD).
|
|
||||||
# The value of these variables can be overridden by the user by specifying
|
|
||||||
# a compiler with an environment variable (like you do for standard CC).
|
|
||||||
#
|
|
||||||
# It also sets BUILD_EXEEXT and BUILD_OBJEXT to the executable and object
|
|
||||||
# file extensions for the build platform, and GCC_FOR_BUILD to `yes' if
|
|
||||||
# the compiler we found is GCC. All these variables but GCC_FOR_BUILD are
|
|
||||||
# substituted in the Makefile.
|
|
||||||
#
|
|
||||||
# LICENSE
|
|
||||||
#
|
|
||||||
# Copyright (c) 2008 Paolo Bonzini <bonzini@gnu.org>
|
|
||||||
#
|
|
||||||
# Copying and distribution of this file, with or without modification, are
|
|
||||||
# permitted in any medium without royalty provided the copyright notice
|
|
||||||
# and this notice are preserved. This file is offered as-is, without any
|
|
||||||
# warranty.
|
|
||||||
|
|
||||||
#serial 18
|
|
||||||
|
|
||||||
AU_ALIAS([AC_PROG_CC_FOR_BUILD], [AX_PROG_CC_FOR_BUILD])
|
|
||||||
AC_DEFUN([AX_PROG_CC_FOR_BUILD], [dnl
|
|
||||||
AC_REQUIRE([AC_PROG_CC])dnl
|
|
||||||
AC_REQUIRE([AC_PROG_CPP])dnl
|
|
||||||
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
|
|
||||||
|
|
||||||
dnl Use the standard macros, but make them use other variable names
|
|
||||||
dnl
|
|
||||||
pushdef([ac_cv_prog_CPP], ac_cv_build_prog_CPP)dnl
|
|
||||||
pushdef([ac_cv_prog_cc_c89], ac_cv_build_prog_cc_c89)dnl
|
|
||||||
pushdef([ac_cv_prog_gcc], ac_cv_build_prog_gcc)dnl
|
|
||||||
pushdef([ac_cv_prog_cc_works], ac_cv_build_prog_cc_works)dnl
|
|
||||||
pushdef([ac_cv_prog_cc_cross], ac_cv_build_prog_cc_cross)dnl
|
|
||||||
pushdef([ac_cv_prog_cc_g], ac_cv_build_prog_cc_g)dnl
|
|
||||||
pushdef([ac_cv_c_compiler_gnu], ac_cv_build_c_compiler_gnu)dnl
|
|
||||||
pushdef([ac_cv_exeext], ac_cv_build_exeext)dnl
|
|
||||||
pushdef([ac_cv_objext], ac_cv_build_objext)dnl
|
|
||||||
pushdef([ac_exeext], ac_build_exeext)dnl
|
|
||||||
pushdef([ac_objext], ac_build_objext)dnl
|
|
||||||
pushdef([CC], CC_FOR_BUILD)dnl
|
|
||||||
pushdef([CPP], CPP_FOR_BUILD)dnl
|
|
||||||
pushdef([GCC], GCC_FOR_BUILD)dnl
|
|
||||||
pushdef([CFLAGS], CFLAGS_FOR_BUILD)dnl
|
|
||||||
pushdef([CPPFLAGS], CPPFLAGS_FOR_BUILD)dnl
|
|
||||||
pushdef([EXEEXT], BUILD_EXEEXT)dnl
|
|
||||||
pushdef([LDFLAGS], LDFLAGS_FOR_BUILD)dnl
|
|
||||||
pushdef([OBJEXT], BUILD_OBJEXT)dnl
|
|
||||||
pushdef([host], build)dnl
|
|
||||||
pushdef([host_alias], build_alias)dnl
|
|
||||||
pushdef([host_cpu], build_cpu)dnl
|
|
||||||
pushdef([host_vendor], build_vendor)dnl
|
|
||||||
pushdef([host_os], build_os)dnl
|
|
||||||
pushdef([ac_cv_host], ac_cv_build)dnl
|
|
||||||
pushdef([ac_cv_host_alias], ac_cv_build_alias)dnl
|
|
||||||
pushdef([ac_cv_host_cpu], ac_cv_build_cpu)dnl
|
|
||||||
pushdef([ac_cv_host_vendor], ac_cv_build_vendor)dnl
|
|
||||||
pushdef([ac_cv_host_os], ac_cv_build_os)dnl
|
|
||||||
pushdef([ac_tool_prefix], ac_build_tool_prefix)dnl
|
|
||||||
pushdef([am_cv_CC_dependencies_compiler_type], am_cv_build_CC_dependencies_compiler_type)dnl
|
|
||||||
pushdef([am_cv_prog_cc_c_o], am_cv_build_prog_cc_c_o)dnl
|
|
||||||
pushdef([cross_compiling], cross_compiling_build)dnl
|
|
||||||
|
|
||||||
cross_compiling_build=no
|
|
||||||
|
|
||||||
ac_build_tool_prefix=
|
|
||||||
AS_IF([test -n "$build"], [ac_build_tool_prefix="$build-"],
|
|
||||||
[test -n "$build_alias"],[ac_build_tool_prefix="$build_alias-"])
|
|
||||||
|
|
||||||
AC_LANG_PUSH([C])
|
|
||||||
AC_PROG_CC
|
|
||||||
_AC_COMPILER_EXEEXT
|
|
||||||
_AC_COMPILER_OBJEXT
|
|
||||||
AC_PROG_CPP
|
|
||||||
|
|
||||||
dnl Restore the old definitions
|
|
||||||
dnl
|
|
||||||
popdef([cross_compiling])dnl
|
|
||||||
popdef([am_cv_prog_cc_c_o])dnl
|
|
||||||
popdef([am_cv_CC_dependencies_compiler_type])dnl
|
|
||||||
popdef([ac_tool_prefix])dnl
|
|
||||||
popdef([ac_cv_host_os])dnl
|
|
||||||
popdef([ac_cv_host_vendor])dnl
|
|
||||||
popdef([ac_cv_host_cpu])dnl
|
|
||||||
popdef([ac_cv_host_alias])dnl
|
|
||||||
popdef([ac_cv_host])dnl
|
|
||||||
popdef([host_os])dnl
|
|
||||||
popdef([host_vendor])dnl
|
|
||||||
popdef([host_cpu])dnl
|
|
||||||
popdef([host_alias])dnl
|
|
||||||
popdef([host])dnl
|
|
||||||
popdef([OBJEXT])dnl
|
|
||||||
popdef([LDFLAGS])dnl
|
|
||||||
popdef([EXEEXT])dnl
|
|
||||||
popdef([CPPFLAGS])dnl
|
|
||||||
popdef([CFLAGS])dnl
|
|
||||||
popdef([GCC])dnl
|
|
||||||
popdef([CPP])dnl
|
|
||||||
popdef([CC])dnl
|
|
||||||
popdef([ac_objext])dnl
|
|
||||||
popdef([ac_exeext])dnl
|
|
||||||
popdef([ac_cv_objext])dnl
|
|
||||||
popdef([ac_cv_exeext])dnl
|
|
||||||
popdef([ac_cv_c_compiler_gnu])dnl
|
|
||||||
popdef([ac_cv_prog_cc_g])dnl
|
|
||||||
popdef([ac_cv_prog_cc_cross])dnl
|
|
||||||
popdef([ac_cv_prog_cc_works])dnl
|
|
||||||
popdef([ac_cv_prog_cc_c89])dnl
|
|
||||||
popdef([ac_cv_prog_gcc])dnl
|
|
||||||
popdef([ac_cv_prog_CPP])dnl
|
|
||||||
|
|
||||||
dnl restore global variables ac_ext, ac_cpp, ac_compile,
|
|
||||||
dnl ac_link, ac_compiler_gnu (dependant on the current
|
|
||||||
dnl language after popping):
|
|
||||||
AC_LANG_POP([C])
|
|
||||||
|
|
||||||
dnl Finally, set Makefile variables
|
|
||||||
dnl
|
|
||||||
AC_SUBST(BUILD_EXEEXT)dnl
|
|
||||||
AC_SUBST(BUILD_OBJEXT)dnl
|
|
||||||
AC_SUBST([CFLAGS_FOR_BUILD])dnl
|
|
||||||
AC_SUBST([CPPFLAGS_FOR_BUILD])dnl
|
|
||||||
AC_SUBST([LDFLAGS_FOR_BUILD])dnl
|
|
||||||
])
|
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ Makefile: $(srcdir)/Makefile.in ../config.status
|
||||||
dep:
|
dep:
|
||||||
mkdir dep
|
mkdir dep
|
||||||
|
|
||||||
%.o: %.c
|
%.o: %.c | dep
|
||||||
$(CC) $(CPPFLAGS) $(CFLAGS) @DEPENDENCY_FLAG@ -c $<
|
$(CC) $(CPPFLAGS) $(CFLAGS) @DEPENDENCY_FLAG@ -c $<
|
||||||
mv $*.d dep
|
mv $*.d dep
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2003-2010 Stephen Williams (steve@icarus.com)
|
* Copyright (c) 2003-2026 Stephen Williams (steve@icarus.com)
|
||||||
*
|
*
|
||||||
* This source code is free software; you can redistribute it
|
* This source code is free software; you can redistribute it
|
||||||
* and/or modify it in source code form under the terms of the GNU
|
* and/or modify it in source code form under the terms of the GNU
|
||||||
|
|
@ -53,7 +53,7 @@ static void thunker_register(void)
|
||||||
strncpy(module, cp, bp-cp);
|
strncpy(module, cp, bp-cp);
|
||||||
module[bp-cp] = 0;
|
module[bp-cp] = 0;
|
||||||
|
|
||||||
mod = ivl_dlopen(module);
|
mod = ivl_dlopen(module, false);
|
||||||
if (mod == 0) {
|
if (mod == 0) {
|
||||||
vpi_printf("%s link: %s\n", vlog_info.argv[idx], dlerror());
|
vpi_printf("%s link: %s\n", vlog_info.argv[idx], dlerror());
|
||||||
free(module);
|
free(module);
|
||||||
|
|
|
||||||
|
|
@ -4,4 +4,4 @@ nullPointerOutOfMemory:cadpli.c:53
|
||||||
nullPointerOutOfMemory:cadpli.c:54
|
nullPointerOutOfMemory:cadpli.c:54
|
||||||
|
|
||||||
// Unused function
|
// Unused function
|
||||||
unusedFunction:ivl_dlfcn.h:73
|
unusedFunction:ivl_dlfcn.h:87
|
||||||
|
|
|
||||||
|
|
@ -1,94 +0,0 @@
|
||||||
#ifndef IVL_ivl_dlfcn_H
|
|
||||||
#define IVL_ivl_dlfcn_H
|
|
||||||
/*
|
|
||||||
* Copyright (c) 2001-2014 Stephen Williams (steve@icarus.com)
|
|
||||||
*
|
|
||||||
* This source code is free software; you can redistribute it
|
|
||||||
* and/or modify it in source code form under the terms of the GNU
|
|
||||||
* General Public License as published by the Free Software
|
|
||||||
* Foundation; either version 2 of the License, or (at your option)
|
|
||||||
* any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if defined(__MINGW32__)
|
|
||||||
# include <windows.h>
|
|
||||||
# include <stdio.h>
|
|
||||||
typedef void * ivl_dll_t;
|
|
||||||
#elif defined(HAVE_DLFCN_H)
|
|
||||||
# include <dlfcn.h>
|
|
||||||
typedef void* ivl_dll_t;
|
|
||||||
#elif defined(HAVE_DL_H)
|
|
||||||
# include <dl.h>
|
|
||||||
typedef shl_t ivl_dll_t;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(__MINGW32__)
|
|
||||||
static __inline__ ivl_dll_t ivl_dlopen(const char *name)
|
|
||||||
{ return (void *)LoadLibrary(name); }
|
|
||||||
|
|
||||||
static __inline__ void *ivl_dlsym(ivl_dll_t dll, const char *nm)
|
|
||||||
{ return (void *)GetProcAddress((HINSTANCE)dll,nm);}
|
|
||||||
|
|
||||||
static __inline__ void ivl_dlclose(ivl_dll_t dll)
|
|
||||||
{ (void)FreeLibrary((HINSTANCE)dll);}
|
|
||||||
|
|
||||||
static __inline__ const char *dlerror(void)
|
|
||||||
{
|
|
||||||
static char msg[256];
|
|
||||||
unsigned long err = GetLastError();
|
|
||||||
FormatMessage(
|
|
||||||
FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
|
|
||||||
NULL,
|
|
||||||
err,
|
|
||||||
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
|
|
||||||
(LPTSTR) &msg,
|
|
||||||
sizeof(msg) - 1,
|
|
||||||
NULL
|
|
||||||
);
|
|
||||||
return msg;
|
|
||||||
}
|
|
||||||
|
|
||||||
#elif defined(HAVE_DLFCN_H)
|
|
||||||
static __inline__ ivl_dll_t ivl_dlopen(const char*name)
|
|
||||||
{ return dlopen(name,RTLD_LAZY); }
|
|
||||||
|
|
||||||
static __inline__ void* ivl_dlsym(ivl_dll_t dll, const char*nm)
|
|
||||||
{
|
|
||||||
void*sym = dlsym(dll, nm);
|
|
||||||
/* Not found? try without the leading _ */
|
|
||||||
if (sym == 0 && nm[0] == '_')
|
|
||||||
sym = dlsym(dll, nm+1);
|
|
||||||
return sym;
|
|
||||||
}
|
|
||||||
|
|
||||||
static __inline__ void ivl_dlclose(ivl_dll_t dll)
|
|
||||||
{ dlclose(dll); }
|
|
||||||
|
|
||||||
#elif defined(HAVE_DL_H)
|
|
||||||
static __inline__ ivl_dll_t ivl_dlopen(const char*name)
|
|
||||||
{ return shl_load(name, BIND_IMMEDIATE, 0); }
|
|
||||||
|
|
||||||
static __inline__ void* ivl_dlsym(ivl_dll_t dll, const char*nm)
|
|
||||||
{
|
|
||||||
void*sym;
|
|
||||||
int rc = shl_findsym(&dll, nm, TYPE_PROCEDURE, &sym);
|
|
||||||
return (rc == 0) ? sym : 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static __inline__ void ivl_dlclose(ivl_dll_t dll)
|
|
||||||
{ shl_unload(dll); }
|
|
||||||
|
|
||||||
static __inline__ const char*dlerror(void)
|
|
||||||
{ return strerror( errno ); }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* IVL_ivl_dlfcn_H */
|
|
||||||
21
compiler.h
21
compiler.h
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef IVL_compiler_H
|
#ifndef IVL_compiler_H
|
||||||
#define IVL_compiler_H
|
#define IVL_compiler_H
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1999-2021 Stephen Williams (steve@icarus.com)
|
* Copyright (c) 1999-2026 Stephen Williams (steve@icarus.com)
|
||||||
*
|
*
|
||||||
* This source code is free software; you can redistribute it
|
* This source code is free software; you can redistribute it
|
||||||
* and/or modify it in source code form under the terms of the GNU
|
* and/or modify it in source code form under the terms of the GNU
|
||||||
|
|
@ -104,6 +104,9 @@ extern bool warn_sens_entire_arr;
|
||||||
/* Warn about level-appropriate anachronisms. */
|
/* Warn about level-appropriate anachronisms. */
|
||||||
extern bool warn_anachronisms;
|
extern bool warn_anachronisms;
|
||||||
|
|
||||||
|
/* Warn about declaration after use (unless flaged as errors). */
|
||||||
|
extern bool warn_decl_after_use;
|
||||||
|
|
||||||
/* Warn about nets that are references but not driven. */
|
/* Warn about nets that are references but not driven. */
|
||||||
extern bool warn_floating_nets;
|
extern bool warn_floating_nets;
|
||||||
|
|
||||||
|
|
@ -162,6 +165,8 @@ enum generation_t {
|
||||||
GN_VER2005_SV = 5,
|
GN_VER2005_SV = 5,
|
||||||
GN_VER2009 = 6,
|
GN_VER2009 = 6,
|
||||||
GN_VER2012 = 7,
|
GN_VER2012 = 7,
|
||||||
|
GN_VER2017 = 8,
|
||||||
|
GN_VER2023 = 9,
|
||||||
GN_DEFAULT = 4
|
GN_DEFAULT = 4
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -210,6 +215,20 @@ extern bool gn_strict_expr_width_flag;
|
||||||
loop. */
|
loop. */
|
||||||
extern bool gn_shared_loop_index_flag;
|
extern bool gn_shared_loop_index_flag;
|
||||||
|
|
||||||
|
/* If this flag is true (default), then parameters must be declared before
|
||||||
|
use. `-gno-strict[-parameter]-declaration` allows to use parameters before
|
||||||
|
declaration, as prior to version 13.
|
||||||
|
A warning is emited with -Wdeclaration-after-use (default).
|
||||||
|
*/
|
||||||
|
extern bool gn_strict_parameter_declaration;
|
||||||
|
|
||||||
|
/* If this flag is true (default), then nets and variablesmust be declared
|
||||||
|
before use. `-gno-strict[-net-var]-declaration` allows to use nets and
|
||||||
|
variables before declaration, as prior to version 13.
|
||||||
|
A warning is emited with -Wdeclaration-after-use (default).
|
||||||
|
*/
|
||||||
|
extern bool gn_strict_net_var_declaration;
|
||||||
|
|
||||||
static inline bool gn_system_verilog(void)
|
static inline bool gn_system_verilog(void)
|
||||||
{
|
{
|
||||||
if (generation_flag >= GN_VER2005_SV)
|
if (generation_flag >= GN_VER2005_SV)
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Attempt to guess a canonical system name.
|
# Attempt to guess a canonical system name.
|
||||||
# Copyright 1992-2025 Free Software Foundation, Inc.
|
# Copyright 1992-2026 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# shellcheck disable=SC2006,SC2268 # see below for rationale
|
# shellcheck disable=SC2006,SC2268 # see below for rationale
|
||||||
|
|
||||||
timestamp='2025-07-10'
|
timestamp='2026-05-17'
|
||||||
|
|
||||||
# This file is free software; you can redistribute it and/or modify it
|
# This file is free software; you can redistribute it and/or modify it
|
||||||
# under the terms of the GNU General Public License as published by
|
# under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -60,7 +60,7 @@ version="\
|
||||||
GNU config.guess ($timestamp)
|
GNU config.guess ($timestamp)
|
||||||
|
|
||||||
Originally written by Per Bothner.
|
Originally written by Per Bothner.
|
||||||
Copyright 1992-2025 Free Software Foundation, Inc.
|
Copyright 1992-2026 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This is free software; see the source for copying conditions. There is NO
|
This is free software; see the source for copying conditions. There is NO
|
||||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||||
|
|
@ -150,7 +150,7 @@ UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
|
||||||
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
|
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
|
||||||
|
|
||||||
case $UNAME_SYSTEM in
|
case $UNAME_SYSTEM in
|
||||||
Linux|GNU|GNU/*)
|
Ironclad|Linux|GNU|GNU/*)
|
||||||
LIBC=unknown
|
LIBC=unknown
|
||||||
|
|
||||||
set_cc_for_build
|
set_cc_for_build
|
||||||
|
|
@ -167,6 +167,8 @@ Linux|GNU|GNU/*)
|
||||||
LIBC=gnu
|
LIBC=gnu
|
||||||
#elif defined(__LLVM_LIBC__)
|
#elif defined(__LLVM_LIBC__)
|
||||||
LIBC=llvm
|
LIBC=llvm
|
||||||
|
#elif defined(__mlibc__)
|
||||||
|
LIBC=mlibc
|
||||||
#else
|
#else
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
/* First heuristic to detect musl libc. */
|
/* First heuristic to detect musl libc. */
|
||||||
|
|
@ -1186,6 +1188,9 @@ EOF
|
||||||
sparc:Linux:*:* | sparc64:Linux:*:*)
|
sparc:Linux:*:* | sparc64:Linux:*:*)
|
||||||
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
||||||
;;
|
;;
|
||||||
|
sw_64:Linux:*:*)
|
||||||
|
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
||||||
|
;;
|
||||||
tile*:Linux:*:*)
|
tile*:Linux:*:*)
|
||||||
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
||||||
;;
|
;;
|
||||||
|
|
@ -1598,10 +1603,10 @@ EOF
|
||||||
GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
|
GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
|
||||||
;;
|
;;
|
||||||
x86_64:[Ii]ronclad:*:*|i?86:[Ii]ronclad:*:*)
|
x86_64:[Ii]ronclad:*:*|i?86:[Ii]ronclad:*:*)
|
||||||
GUESS=$UNAME_MACHINE-pc-ironclad-mlibc
|
GUESS=$UNAME_MACHINE-pc-ironclad-$LIBC
|
||||||
;;
|
;;
|
||||||
*:[Ii]ronclad:*:*)
|
*:[Ii]ronclad:*:*)
|
||||||
GUESS=$UNAME_MACHINE-unknown-ironclad-mlibc
|
GUESS=$UNAME_MACHINE-unknown-ironclad-$LIBC
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Configuration validation subroutine script.
|
# Configuration validation subroutine script.
|
||||||
# Copyright 1992-2025 Free Software Foundation, Inc.
|
# Copyright 1992-2026 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# shellcheck disable=SC2006,SC2268,SC2162 # see below for rationale
|
# shellcheck disable=SC2006,SC2268,SC2162 # see below for rationale
|
||||||
|
|
||||||
timestamp='2025-07-10'
|
timestamp='2026-05-17'
|
||||||
|
|
||||||
# This file is free software; you can redistribute it and/or modify it
|
# This file is free software; you can redistribute it and/or modify it
|
||||||
# under the terms of the GNU General Public License as published by
|
# under the terms of the GNU General Public License as published by
|
||||||
|
|
@ -76,7 +76,7 @@ Report bugs and patches to <config-patches@gnu.org>."
|
||||||
version="\
|
version="\
|
||||||
GNU config.sub ($timestamp)
|
GNU config.sub ($timestamp)
|
||||||
|
|
||||||
Copyright 1992-2025 Free Software Foundation, Inc.
|
Copyright 1992-2026 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This is free software; see the source for copying conditions. There is NO
|
This is free software; see the source for copying conditions. There is NO
|
||||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||||
|
|
@ -1432,6 +1432,7 @@ case $cpu-$vendor in
|
||||||
| sparcv9v \
|
| sparcv9v \
|
||||||
| spu \
|
| spu \
|
||||||
| sv1 \
|
| sv1 \
|
||||||
|
| sw_64 \
|
||||||
| sx* \
|
| sx* \
|
||||||
| tahoe \
|
| tahoe \
|
||||||
| thumbv7* \
|
| thumbv7* \
|
||||||
|
|
@ -1525,7 +1526,7 @@ EOF
|
||||||
;;
|
;;
|
||||||
ironclad*)
|
ironclad*)
|
||||||
kernel=ironclad
|
kernel=ironclad
|
||||||
os=`echo "$basic_os" | sed -e 's|ironclad|mlibc|'`
|
os=`echo "$basic_os" | sed -e 's|ironclad|gnu|'`
|
||||||
;;
|
;;
|
||||||
linux*)
|
linux*)
|
||||||
kernel=linux
|
kernel=linux
|
||||||
|
|
@ -2220,7 +2221,7 @@ case $kernel-$os-$obj in
|
||||||
;;
|
;;
|
||||||
uclinux-uclibc*- | uclinux-gnu*- )
|
uclinux-uclibc*- | uclinux-gnu*- )
|
||||||
;;
|
;;
|
||||||
ironclad-mlibc*-)
|
ironclad-gnu*- | ironclad-mlibc*- )
|
||||||
;;
|
;;
|
||||||
managarm-mlibc*- | managarm-kernel*- )
|
managarm-mlibc*- | managarm-kernel*- )
|
||||||
;;
|
;;
|
||||||
|
|
|
||||||
108
configure.ac
108
configure.ac
|
|
@ -1,6 +1,35 @@
|
||||||
dnl Process this file with autoconf to produce a configure script.
|
dnl Process this file with autoconf to produce a configure script.
|
||||||
AC_INIT
|
|
||||||
|
AC_CONFIG_MACRO_DIRS([m4])
|
||||||
|
|
||||||
|
dnl Define project version
|
||||||
|
m4_define([VER_MAJOR], [14])
|
||||||
|
m4_define([VER_MINOR], [0])
|
||||||
|
m4_define([VER_EXTRA], [devel])
|
||||||
|
|
||||||
|
dnl define libvvp ABI version
|
||||||
|
m4_define([LIBVVP_SOVERSION], [1])
|
||||||
|
|
||||||
|
AC_INIT([iverilog], [VER_MAJOR.VER_MINOR (VER_EXTRA)])
|
||||||
|
AC_SUBST([VERSION_MAJOR], [VER_MAJOR])
|
||||||
|
AC_SUBST([VERSION_MINOR], [VER_MINOR])
|
||||||
|
AC_SUBST([VERSION_EXTRA], [" (VER_EXTRA)"])
|
||||||
|
AC_SUBST([VERSION], ["VER_MAJOR.VER_MINOR (VER_EXTRA)"])
|
||||||
|
# used in res.rc
|
||||||
|
AC_SUBST([PRODUCTVERSION], ["VER_MAJOR,VER_MINOR,0,0"])
|
||||||
|
|
||||||
|
# setup libvvp soversion, which depends on abi not package version
|
||||||
|
AC_SUBST([LIBVVP_SOVERSION], [LIBVVP_SOVERSION])
|
||||||
|
# setup libvvp version
|
||||||
|
AC_SUBST([LIBVVP_VERSION], [LIBVVP_SOVERSION.VER_MAJOR.VER_MINOR])
|
||||||
|
|
||||||
AC_CONFIG_SRCDIR([netlist.h])
|
AC_CONFIG_SRCDIR([netlist.h])
|
||||||
|
# Need a stamp file like the other header files
|
||||||
|
AC_CONFIG_FILES([version_base.h],[
|
||||||
|
_config_header=version_base.h
|
||||||
|
_stamp_name=stamp-`expr //$_config_header : '.*/\([[^./]]*\)\.[[^./]]*$'`-h
|
||||||
|
echo "timestamp for $_config_header" > `AS_DIRNAME(["$_config_header"])`/[]$_stamp_name
|
||||||
|
])
|
||||||
AC_CONFIG_HEADERS([config.h])
|
AC_CONFIG_HEADERS([config.h])
|
||||||
AC_CONFIG_HEADERS([_pli_types.h])
|
AC_CONFIG_HEADERS([_pli_types.h])
|
||||||
AC_CONFIG_HEADERS([vhdlpp/vhdlpp_config.h])
|
AC_CONFIG_HEADERS([vhdlpp/vhdlpp_config.h])
|
||||||
|
|
@ -18,6 +47,10 @@ AX_PROG_CC_FOR_BUILD
|
||||||
AC_PREREQ([2.62])
|
AC_PREREQ([2.62])
|
||||||
m4_version_prereq([2.70], [], [AC_PROG_CC_C99])
|
m4_version_prereq([2.70], [], [AC_PROG_CC_C99])
|
||||||
AC_PROG_CXX
|
AC_PROG_CXX
|
||||||
|
|
||||||
|
# Require C++11 (avoid newer defaults like C++23 from newer toolchains)
|
||||||
|
AX_CXX_COMPILE_STDCXX(11, noext, mandatory)
|
||||||
|
|
||||||
AC_PROG_RANLIB
|
AC_PROG_RANLIB
|
||||||
AC_CHECK_TOOL(LD, ld, false)
|
AC_CHECK_TOOL(LD, ld, false)
|
||||||
AC_CHECK_TOOL(AR, ar, false)
|
AC_CHECK_TOOL(AR, ar, false)
|
||||||
|
|
@ -65,6 +98,20 @@ AC_SUBST(EXEEXT)
|
||||||
# Combined check for Microsoft-related bogosities; sets WIN32 if found
|
# Combined check for Microsoft-related bogosities; sets WIN32 if found
|
||||||
AX_WIN32
|
AX_WIN32
|
||||||
|
|
||||||
|
# Detect which directory/file separator to use
|
||||||
|
AC_MSG_CHECKING([for directory/file separator])
|
||||||
|
|
||||||
|
AS_CASE([$host_os:$MSYSTEM],
|
||||||
|
[*mingw*:UCRT64|*mingw*:MINGW64|*mingw*:MINGW32|*mingw*:CLANG64|*mingw*:CLANGARM64], [
|
||||||
|
PATH_SEP=\\\\
|
||||||
|
],
|
||||||
|
[
|
||||||
|
PATH_SEP=/
|
||||||
|
]
|
||||||
|
)
|
||||||
|
AC_MSG_RESULT([$PATH_SEP])
|
||||||
|
AC_SUBST([PATH_SEP])
|
||||||
|
|
||||||
# Check to see if we are using the Sun compiler. If so then configure
|
# Check to see if we are using the Sun compiler. If so then configure
|
||||||
# some of the flags to match the Sun compiler syntax. This is also used
|
# some of the flags to match the Sun compiler syntax. This is also used
|
||||||
# in the aclocal.m4 file to configure the flags used to build and link
|
# in the aclocal.m4 file to configure the flags used to build and link
|
||||||
|
|
@ -184,7 +231,14 @@ AC_FUNC_FSEEKO
|
||||||
# Build VVP as a library and stub
|
# Build VVP as a library and stub
|
||||||
AC_ARG_ENABLE([libvvp],
|
AC_ARG_ENABLE([libvvp],
|
||||||
[AS_HELP_STRING([--enable-libvvp], [build VVP as a shared library])],
|
[AS_HELP_STRING([--enable-libvvp], [build VVP as a shared library])],
|
||||||
[AC_SUBST(LIBVVP, yes)],[])
|
[enable_libvvp=yes],
|
||||||
|
[enable_libvvp=no])
|
||||||
|
|
||||||
|
AC_SUBST([LIBVVP], [$enable_libvvp])
|
||||||
|
|
||||||
|
AS_IF([test "x$enable_libvvp" = "xyes"],
|
||||||
|
[AC_MSG_NOTICE([Building with libvvp support enabled])],
|
||||||
|
[AC_MSG_NOTICE([Building with libvvp support disabled])])
|
||||||
|
|
||||||
AC_ARG_ENABLE([libveriuser],
|
AC_ARG_ENABLE([libveriuser],
|
||||||
[AS_HELP_STRING([--enable-libveriuser], [include support for PLI 1 (deprecated)])],
|
[AS_HELP_STRING([--enable-libveriuser], [include support for PLI 1 (deprecated)])],
|
||||||
|
|
@ -269,6 +323,27 @@ case "${host}" in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
# Setup test environment for running vvp from build directory
|
||||||
|
VVP_BUILDDIR="$(pwd)/vvp"
|
||||||
|
case "$host_os" in
|
||||||
|
linux*)
|
||||||
|
ENV_VVP="LD_LIBRARY_PATH=$VVP_BUILDDIR"
|
||||||
|
;;
|
||||||
|
*bsd*)
|
||||||
|
ENV_VVP="LD_LIBRARY_PATH=$VVP_BUILDDIR"
|
||||||
|
;;
|
||||||
|
darwin*)
|
||||||
|
ENV_VVP="DYLD_LIBRARY_PATH=$VVP_BUILDDIR"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
# Since the libvvp DLL is located in the same directory as the
|
||||||
|
# vvp executable, no action is required here
|
||||||
|
ENV_VVP=""
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
AC_SUBST([ENV_VVP])
|
||||||
|
|
||||||
|
|
||||||
# Do some more operating system specific setup. We put the file64_support
|
# Do some more operating system specific setup. We put the file64_support
|
||||||
# define in a substitution instead of simply a define because there
|
# define in a substitution instead of simply a define because there
|
||||||
# are source files (namely lxt support files) that don't include any
|
# are source files (namely lxt support files) that don't include any
|
||||||
|
|
@ -366,5 +441,32 @@ then
|
||||||
AC_MSG_ERROR(cannot configure white space in libdir: $libdir)
|
AC_MSG_ERROR(cannot configure white space in libdir: $libdir)
|
||||||
fi
|
fi
|
||||||
AC_MSG_RESULT(ok)
|
AC_MSG_RESULT(ok)
|
||||||
AC_CONFIG_FILES([Makefile ivlpp/Makefile vhdlpp/Makefile vvp/Makefile vpi/Makefile driver/Makefile driver-vpi/Makefile cadpli/Makefile libveriuser/Makefile tgt-null/Makefile tgt-stub/Makefile tgt-vvp/Makefile tgt-vhdl/Makefile tgt-fpga/Makefile tgt-verilog/Makefile tgt-pal/Makefile tgt-vlog95/Makefile tgt-pcb/Makefile tgt-blif/Makefile tgt-sizer/Makefile])
|
AC_CONFIG_FILES([
|
||||||
|
Makefile
|
||||||
|
cadpli/Makefile
|
||||||
|
driver-vpi/Makefile
|
||||||
|
driver-vpi/iverilog-vpi.man
|
||||||
|
driver-vpi/res.rc
|
||||||
|
driver/Makefile
|
||||||
|
driver/iverilog.man
|
||||||
|
ivlpp/Makefile
|
||||||
|
ivtest/Makefile
|
||||||
|
libveriuser/Makefile
|
||||||
|
tgt-blif/Makefile
|
||||||
|
tgt-fpga/Makefile
|
||||||
|
tgt-null/Makefile
|
||||||
|
tgt-pal/Makefile
|
||||||
|
tgt-pcb/Makefile
|
||||||
|
tgt-sizer/Makefile
|
||||||
|
tgt-stub/Makefile
|
||||||
|
tgt-verilog/Makefile
|
||||||
|
tgt-vhdl/Makefile
|
||||||
|
tgt-vlog95/Makefile
|
||||||
|
tgt-vvp/Makefile
|
||||||
|
vhdlpp/Makefile
|
||||||
|
vpi/Makefile
|
||||||
|
vvp/Makefile
|
||||||
|
vvp/libvvp.pc
|
||||||
|
vvp/vvp.man
|
||||||
|
])
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
|
|
||||||
59
cppcheck.sup
59
cppcheck.sup
|
|
@ -10,47 +10,49 @@ nullPointerOutOfMemory
|
||||||
ctuuninitvar:parse_misc.cc:61
|
ctuuninitvar:parse_misc.cc:61
|
||||||
|
|
||||||
// Skip strdup() not constant.
|
// Skip strdup() not constant.
|
||||||
constVariablePointer:main.cc:400
|
constVariablePointer:main.cc:421
|
||||||
constVariablePointer:main.cc:404
|
constVariablePointer:main.cc:425
|
||||||
constVariablePointer:main.cc:654
|
constVariablePointer:main.cc:675
|
||||||
|
|
||||||
// const auto should be const
|
// const auto should be const
|
||||||
constVariablePointer:elab_expr.cc:344
|
constVariablePointer:elab_expr.cc:344
|
||||||
constVariablePointer:elab_expr.cc:413
|
constVariablePointer:elab_expr.cc:347
|
||||||
|
constVariablePointer:elab_expr.cc:416
|
||||||
|
|
||||||
// The reference cannot be const since it is updated in the calling function.
|
// The reference cannot be const since it is updated in the calling function.
|
||||||
constParameterReference:net_udp.cc:37
|
constParameterReference:net_udp.cc:37
|
||||||
|
|
||||||
// These cannot be static since they access object data
|
// These cannot be static since they access object data
|
||||||
functionStatic:net_link.cc:178
|
functionStatic:net_link.cc:178
|
||||||
functionStatic:net_link.cc:183
|
functionStatic:net_link.cc:184
|
||||||
functionStatic:net_link.cc:188
|
functionStatic:net_link.cc:189
|
||||||
functionStatic:net_link.cc:193
|
functionStatic:net_link.cc:194
|
||||||
|
|
||||||
// This cannot be static when checking with valgrind
|
// This cannot be static when checking with valgrind
|
||||||
functionStatic:libmisc/StringHeap.cc
|
functionStatic:libmisc/StringHeap.cc
|
||||||
|
|
||||||
// Skip not initialized in the constructor for target scope
|
// Skip not initialized in the constructor for target scope
|
||||||
|
uninitMemberVar:t-dll.cc:41
|
||||||
uninitMemberVar:t-dll.cc:109
|
uninitMemberVar:t-dll.cc:109
|
||||||
|
|
||||||
// By convention we put statics at the top scope.
|
// By convention we put statics at the top scope.
|
||||||
variableScope:pform.cc:3461
|
variableScope:pform.cc:3499
|
||||||
|
|
||||||
// These are correct and are used to find the base (zero) pin.
|
// These are correct and are used to find the base (zero) pin.
|
||||||
thisSubtraction:netlist.h:5309
|
thisSubtraction:netlist.h:5376
|
||||||
thisSubtraction:netlist.h:5318
|
thisSubtraction:netlist.h:5385
|
||||||
|
|
||||||
// This is used when running a debugger
|
// This is used when running a debugger
|
||||||
// debugger_release
|
// debugger_release
|
||||||
knownConditionTrueFalse:main.cc:931
|
knownConditionTrueFalse:main.cc:955
|
||||||
|
|
||||||
// These should be checked, but are not real issues
|
// These should be checked, but are not real issues
|
||||||
knownConditionTrueFalse:elaborate.cc:7621
|
knownConditionTrueFalse:elaborate.cc:7970
|
||||||
knownConditionTrueFalse:elab_sig.cc:271
|
knownConditionTrueFalse:elab_sig.cc:272
|
||||||
knownConditionTrueFalse:elab_sig.cc:338
|
knownConditionTrueFalse:elab_sig.cc:345
|
||||||
|
|
||||||
// Yes, it's a duplicate
|
// Yes, it's a duplicate
|
||||||
duplicateCondition:elaborate.cc:7672
|
duplicateCondition:elaborate.cc:8021
|
||||||
|
|
||||||
// To complicated to use std::find_if()
|
// To complicated to use std::find_if()
|
||||||
useStlAlgorithm:map_named_args.cc:38
|
useStlAlgorithm:map_named_args.cc:38
|
||||||
|
|
@ -59,7 +61,7 @@ useStlAlgorithm:map_named_args.cc:38
|
||||||
derefInvalidIterator:netmisc.cc:420
|
derefInvalidIterator:netmisc.cc:420
|
||||||
|
|
||||||
// By convention we put statics at the top scope.
|
// By convention we put statics at the top scope.
|
||||||
variableScope:t-dll.cc:2377
|
variableScope:t-dll.cc:2309
|
||||||
|
|
||||||
// We check memory allocation with valgrind
|
// We check memory allocation with valgrind
|
||||||
unsafeClassCanLeak:libmisc/StringHeap.h:79
|
unsafeClassCanLeak:libmisc/StringHeap.h:79
|
||||||
|
|
@ -720,31 +722,33 @@ unusedFunction:Statement.h:192
|
||||||
// chain_args()
|
// chain_args()
|
||||||
unusedFunction:Statement.h:341
|
unusedFunction:Statement.h:341
|
||||||
// gn_modules_nest()
|
// gn_modules_nest()
|
||||||
unusedFunction:compiler.h:228
|
unusedFunction:compiler.h:247
|
||||||
// driven_mask()
|
// driven_mask()
|
||||||
unusedFunction:link_const.cc:275
|
unusedFunction:link_const.cc:275
|
||||||
// find_root_scope()
|
// find_root_scope()
|
||||||
unusedFunction:net_design.cc:121
|
unusedFunction:net_design.cc:121
|
||||||
// assign_lval()
|
// assign_lval()
|
||||||
unusedFunction:net_link.cc:282
|
unusedFunction:net_link.cc:283
|
||||||
// intersect()
|
// intersect()
|
||||||
unusedFunction:net_link.cc:689
|
unusedFunction:net_link.cc:687
|
||||||
// get_def_fileline()
|
// get_def_fileline()
|
||||||
unusedFunction:net_scope.cc:201
|
unusedFunction:net_scope.cc:201
|
||||||
// get_module_port_info()
|
// get_module_port_info()
|
||||||
unusedFunction:net_scope.cc:591
|
unusedFunction:net_scope.cc:600
|
||||||
// find_link_signal()
|
// find_link_signal()
|
||||||
unusedFunction:netlist.cc:111
|
unusedFunction:netlist.cc:113
|
||||||
// find_link()
|
// find_link()
|
||||||
unusedFunction:netlist.cc:297
|
unusedFunction:netlist.cc:304
|
||||||
// set_module_port_index()
|
// set_module_port_index()
|
||||||
unusedFunction:netlist.cc:651
|
unusedFunction:netlist.cc:658
|
||||||
// width_a()
|
// width_a()
|
||||||
unusedFunction:netlist.cc:1678
|
unusedFunction:netlist.cc:1685
|
||||||
// width_b()
|
// width_b()
|
||||||
unusedFunction:netlist.cc:1683
|
unusedFunction:netlist.cc:1690
|
||||||
// result_sig()
|
// result_sig()
|
||||||
unusedFunction:netlist.cc:2184
|
unusedFunction:netlist.cc:2191
|
||||||
|
// soft_union()
|
||||||
|
unusedFunction:netstruct.h:93
|
||||||
// test_protected()
|
// test_protected()
|
||||||
unusedFunction:property_qual.h:50
|
unusedFunction:property_qual.h:50
|
||||||
// test_rand()
|
// test_rand()
|
||||||
|
|
@ -756,13 +760,14 @@ unusedFunction:t-dll-expr.cc:55
|
||||||
// mul_expr_by_const_()
|
// mul_expr_by_const_()
|
||||||
unusedFunction:t-dll-expr.cc:91
|
unusedFunction:t-dll-expr.cc:91
|
||||||
// net_assign()
|
// net_assign()
|
||||||
unusedFunction:t-dll.cc:2368
|
unusedFunction:t-dll.cc:2300
|
||||||
// is_before()
|
// is_before()
|
||||||
unusedFunction:verinum.cc:588
|
unusedFunction:verinum.cc:588
|
||||||
|
|
||||||
// Errors/limitations in the generated yacc and lex files
|
// Errors/limitations in the generated yacc and lex files
|
||||||
constVariablePointer:<stdout>
|
constVariablePointer:<stdout>
|
||||||
cstyleCast:<stdout>
|
cstyleCast:<stdout>
|
||||||
|
duplicateBreak:<stdout>
|
||||||
nullPointer:<stdout>
|
nullPointer:<stdout>
|
||||||
redundantInitialization:<stdout>
|
redundantInitialization:<stdout>
|
||||||
syntaxError:<stdout>
|
syntaxError:<stdout>
|
||||||
|
|
|
||||||
4
cprop.cc
4
cprop.cc
|
|
@ -180,9 +180,7 @@ void cprop_functor::lpm_mux(Design*des, NetMux*obj)
|
||||||
<< "Replace binary MUX with constant select=" << sel_val
|
<< "Replace binary MUX with constant select=" << sel_val
|
||||||
<< " with a BUFZ to the selected input." << endl;
|
<< " with a BUFZ to the selected input." << endl;
|
||||||
|
|
||||||
tmp->rise_time(obj->rise_time());
|
tmp->delay_times(obj->delay_times());
|
||||||
tmp->fall_time(obj->fall_time());
|
|
||||||
tmp->decay_time(obj->decay_time());
|
|
||||||
|
|
||||||
connect(tmp->pin(0), obj->pin_Result());
|
connect(tmp->pin(0), obj->pin_Result());
|
||||||
if (sel_val == verinum::V1)
|
if (sel_val == verinum::V1)
|
||||||
|
|
|
||||||
109
design_dump.cc
109
design_dump.cc
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1998-2021 Stephen Williams (steve@icarus.com)
|
* Copyright (c) 1998-2026 Stephen Williams (steve@icarus.com)
|
||||||
*
|
*
|
||||||
* This source code is free software; you can redistribute it
|
* This source code is free software; you can redistribute it
|
||||||
* and/or modify it in source code form under the terms of the GNU
|
* and/or modify it in source code form under the terms of the GNU
|
||||||
|
|
@ -90,6 +90,30 @@ ostream& operator << (ostream&o, ivl_drive_t str)
|
||||||
return o;
|
return o;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ostream &operator << (ostream &o, const drive_strength_t &strength)
|
||||||
|
{
|
||||||
|
o << strength.drive0 << "0 " << strength.drive1 << "1";
|
||||||
|
return o;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void dump_delay_expr(ostream &o, const NetExpr *expr)
|
||||||
|
{
|
||||||
|
if (expr)
|
||||||
|
o << *expr;
|
||||||
|
else
|
||||||
|
o << "0";
|
||||||
|
}
|
||||||
|
|
||||||
|
ostream &operator << (ostream &o, const delay_exprs_t &delays)
|
||||||
|
{
|
||||||
|
dump_delay_expr(o, delays.rise);
|
||||||
|
o << ",";
|
||||||
|
dump_delay_expr(o, delays.fall);
|
||||||
|
o << ",";
|
||||||
|
dump_delay_expr(o, delays.decay);
|
||||||
|
return o;
|
||||||
|
}
|
||||||
|
|
||||||
ostream& operator << (ostream&o, ivl_variable_type_t val)
|
ostream& operator << (ostream&o, ivl_variable_type_t val)
|
||||||
{
|
{
|
||||||
switch (val) {
|
switch (val) {
|
||||||
|
|
@ -454,8 +478,7 @@ void NetNet::dump_net(ostream&o, unsigned ind) const
|
||||||
o << " (eref=" << peek_eref() << ", lref=" << peek_lref() << ")";
|
o << " (eref=" << peek_eref() << ", lref=" << peek_lref() << ")";
|
||||||
if (scope())
|
if (scope())
|
||||||
o << " scope=" << scope_path(scope());
|
o << " scope=" << scope_path(scope());
|
||||||
o << " #(" << rise_time() << "," << fall_time() << ","
|
o << " #(" << delay_times() << ") vector_width=" << vector_width()
|
||||||
<< decay_time() << ") vector_width=" << vector_width()
|
|
||||||
<< " pin_count=" << pin_count();
|
<< " pin_count=" << pin_count();
|
||||||
if (pins_are_virtual()) {
|
if (pins_are_virtual()) {
|
||||||
o << " pins_are_virtual" << endl;
|
o << " pins_are_virtual" << endl;
|
||||||
|
|
@ -486,8 +509,7 @@ void NetNet::dump_net(ostream&o, unsigned ind) const
|
||||||
void NetNode::dump_node(ostream&o, unsigned ind) const
|
void NetNode::dump_node(ostream&o, unsigned ind) const
|
||||||
{
|
{
|
||||||
o << setw(ind) << "" << "node: ";
|
o << setw(ind) << "" << "node: ";
|
||||||
o << typeid(*this).name() << " #(" << rise_time()
|
o << typeid(*this).name() << " #(" << delay_times() << ") " << name()
|
||||||
<< "," << fall_time() << "," << decay_time() << ") " << name()
|
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
dump_node_pins(o, ind+4);
|
dump_node_pins(o, ind+4);
|
||||||
|
|
@ -518,8 +540,7 @@ void NetPins::dump_node_pins(ostream&o, unsigned ind, const char**pin_names) con
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
o << " (" << pin(idx).drive0() << "0 "
|
o << " (" << pin(idx).drive() << "): ";
|
||||||
<< pin(idx).drive1() << "1): ";
|
|
||||||
|
|
||||||
if (pin(idx).is_linked()) {
|
if (pin(idx).is_linked()) {
|
||||||
const Nexus*nex = pin(idx).nexus();
|
const Nexus*nex = pin(idx).nexus();
|
||||||
|
|
@ -622,11 +643,7 @@ void NetConcat::dump_node(ostream&o, unsigned ind) const
|
||||||
o << setw(ind) << "" << "NetConcat: ";
|
o << setw(ind) << "" << "NetConcat: ";
|
||||||
o << name();
|
o << name();
|
||||||
|
|
||||||
if (rise_time())
|
o << " #(" << delay_times() << ")";
|
||||||
o << " #(" << *rise_time()
|
|
||||||
<< "," << *fall_time() << "," << *decay_time() << ")";
|
|
||||||
else
|
|
||||||
o << " #(0,0,0)";
|
|
||||||
o << " scope=" << scope_path(scope())
|
o << " scope=" << scope_path(scope())
|
||||||
<< " width=" << width_ << endl;
|
<< " width=" << width_ << endl;
|
||||||
dump_node_pins(o, ind+4);
|
dump_node_pins(o, ind+4);
|
||||||
|
|
@ -651,14 +668,7 @@ void NetPow::dump_node(ostream&o, unsigned ind) const
|
||||||
{
|
{
|
||||||
o << setw(ind) << "" << "LPM_POW (NetPow): " << name()
|
o << setw(ind) << "" << "LPM_POW (NetPow): " << name()
|
||||||
<< " scope=" << scope_path(scope())
|
<< " scope=" << scope_path(scope())
|
||||||
<< " delay=(";
|
<< " delay=(" << delay_times() << ")" << endl;
|
||||||
if (rise_time())
|
|
||||||
o << *rise_time() << "," << *fall_time() << ","
|
|
||||||
<< *decay_time();
|
|
||||||
else
|
|
||||||
o << "0,0,0";
|
|
||||||
|
|
||||||
o << ")" << endl;
|
|
||||||
dump_node_pins(o, ind+4);
|
dump_node_pins(o, ind+4);
|
||||||
dump_obj_attr(o, ind+4);
|
dump_obj_attr(o, ind+4);
|
||||||
}
|
}
|
||||||
|
|
@ -676,8 +686,7 @@ void NetBUFZ::dump_node(ostream&o, unsigned ind) const
|
||||||
{
|
{
|
||||||
o << setw(ind) << "" << "NetBUFZ: " << name()
|
o << setw(ind) << "" << "NetBUFZ: " << name()
|
||||||
<< " scope=" << scope_path(scope())
|
<< " scope=" << scope_path(scope())
|
||||||
<< " delay=(" << rise_time() << "," << fall_time() << "," <<
|
<< " delay=(" << delay_times() << ") width=" << width()
|
||||||
decay_time() << ") width=" << width()
|
|
||||||
<< (transparent()? " " : " non-") << "transparent" << endl;
|
<< (transparent()? " " : " non-") << "transparent" << endl;
|
||||||
dump_node_pins(o, ind+4);
|
dump_node_pins(o, ind+4);
|
||||||
}
|
}
|
||||||
|
|
@ -693,10 +702,8 @@ void NetConst::dump_node(ostream&o, unsigned ind) const
|
||||||
{
|
{
|
||||||
o << setw(ind) << "" << "constant " << value_;
|
o << setw(ind) << "" << "constant " << value_;
|
||||||
o << ": " << name();
|
o << ": " << name();
|
||||||
if (rise_time())
|
if (delay_times().has_delay())
|
||||||
o << " #(" << *rise_time()
|
o << " #(" << delay_times() << ")";
|
||||||
<< "," << *fall_time()
|
|
||||||
<< "," << *decay_time() << ")";
|
|
||||||
else
|
else
|
||||||
o << " #(.,.,.)";
|
o << " #(.,.,.)";
|
||||||
o << endl;
|
o << endl;
|
||||||
|
|
@ -729,10 +736,8 @@ void NetLiteral::dump_node(ostream&o, unsigned ind) const
|
||||||
{
|
{
|
||||||
o << setw(ind) << "" << "constant real " << real_
|
o << setw(ind) << "" << "constant real " << real_
|
||||||
<< ": " << name();
|
<< ": " << name();
|
||||||
if (rise_time())
|
if (delay_times().has_delay())
|
||||||
o << " #(" << *rise_time()
|
o << " #(" << delay_times() << ")";
|
||||||
<< "," << *fall_time()
|
|
||||||
<< "," << *decay_time() << ")";
|
|
||||||
else
|
else
|
||||||
o << " #(.,.,.)";
|
o << " #(.,.,.)";
|
||||||
o << endl;
|
o << endl;
|
||||||
|
|
@ -810,8 +815,7 @@ void NetLogic::dump_node(ostream&o, unsigned ind) const
|
||||||
o << "xor";
|
o << "xor";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
o << " #(" << rise_time()
|
o << " #(" << delay_times() << ") " << name()
|
||||||
<< "," << fall_time() << "," << decay_time() << ") " << name()
|
|
||||||
<< " scope=" << scope_path(scope())
|
<< " scope=" << scope_path(scope())
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
|
|
@ -839,10 +843,8 @@ void NetPartSelect::dump_node(ostream&o, unsigned ind) const
|
||||||
}
|
}
|
||||||
o << setw(ind) << "" << "NetPartSelect(" << pt << "): "
|
o << setw(ind) << "" << "NetPartSelect(" << pt << "): "
|
||||||
<< name();
|
<< name();
|
||||||
if (rise_time())
|
if (delay_times().has_delay())
|
||||||
o << " #(" << *rise_time()
|
o << " #(" << delay_times() << ")";
|
||||||
<< "," << *fall_time()
|
|
||||||
<< "," << *decay_time() << ")";
|
|
||||||
else
|
else
|
||||||
o << " #(.,.,.)";
|
o << " #(.,.,.)";
|
||||||
o << " off=" << off_ << " wid=" << wid_ <<endl;
|
o << " off=" << off_ << " wid=" << wid_ <<endl;
|
||||||
|
|
@ -854,10 +856,8 @@ void NetSubstitute::dump_node(ostream&fd, unsigned ind) const
|
||||||
{
|
{
|
||||||
fd << setw(ind) << "" << "NetSubstitute: "
|
fd << setw(ind) << "" << "NetSubstitute: "
|
||||||
<< name();
|
<< name();
|
||||||
if (rise_time())
|
if (delay_times().has_delay())
|
||||||
fd << " #(" << *rise_time()
|
fd << " #(" << delay_times() << ")";
|
||||||
<< "," << *fall_time()
|
|
||||||
<< "," << *decay_time() << ")";
|
|
||||||
else
|
else
|
||||||
fd << " #(.,.,.)";
|
fd << " #(.,.,.)";
|
||||||
fd << " width=" << wid_ << " base=" << off_ <<endl;
|
fd << " width=" << wid_ << " base=" << off_ <<endl;
|
||||||
|
|
@ -877,10 +877,8 @@ void NetReplicate::dump_node(ostream&o, unsigned ind) const
|
||||||
void NetSignExtend::dump_node(ostream&o, unsigned ind) const
|
void NetSignExtend::dump_node(ostream&o, unsigned ind) const
|
||||||
{
|
{
|
||||||
o << setw(ind) << "" << "NetSignExtend: " << name();
|
o << setw(ind) << "" << "NetSignExtend: " << name();
|
||||||
if (rise_time())
|
if (delay_times().has_delay())
|
||||||
o << " #(" << *rise_time()
|
o << " #(" << delay_times() << ")";
|
||||||
<< "," << *fall_time()
|
|
||||||
<< "," << *decay_time() << ")";
|
|
||||||
else
|
else
|
||||||
o << " #(.,.,.)";
|
o << " #(.,.,.)";
|
||||||
o << " output width=" << width_ << endl;
|
o << " output width=" << width_ << endl;
|
||||||
|
|
@ -914,8 +912,7 @@ void NetUReduce::dump_node(ostream&o, unsigned ind) const
|
||||||
o << "xnor";
|
o << "xnor";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
o << " #(" << rise_time()
|
o << " #(" << delay_times() << ") " << name()
|
||||||
<< "," << fall_time() << "," << decay_time() << ") " << name()
|
|
||||||
<< " scope=" << scope_path(scope())
|
<< " scope=" << scope_path(scope())
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
|
|
@ -935,10 +932,8 @@ void NetUserFunc::dump_node(ostream&o, unsigned ind) const
|
||||||
{
|
{
|
||||||
o << setw(ind) << "" << "USER FUNC: "
|
o << setw(ind) << "" << "USER FUNC: "
|
||||||
<< scope_path(def_);
|
<< scope_path(def_);
|
||||||
if (rise_time())
|
if (delay_times().has_delay())
|
||||||
o << " #(" <<*rise_time()
|
o << " #(" << delay_times() << ")";
|
||||||
<<","<<*fall_time()
|
|
||||||
<< "," <<*decay_time() << ")";
|
|
||||||
o << endl;
|
o << endl;
|
||||||
dump_node_pins(o, ind+4);
|
dump_node_pins(o, ind+4);
|
||||||
dump_obj_attr(o, ind+4);
|
dump_obj_attr(o, ind+4);
|
||||||
|
|
@ -986,14 +981,7 @@ void NetTran::dump_node(ostream&o, unsigned ind) const
|
||||||
<< " part=" << part_width()
|
<< " part=" << part_width()
|
||||||
<< " offset=" << part_offset();
|
<< " offset=" << part_offset();
|
||||||
}
|
}
|
||||||
o << " delay=(";
|
o << " delay=(" << delay_times() << ")" << endl;
|
||||||
if (rise_time())
|
|
||||||
o << *rise_time() << "," << *fall_time() << ","
|
|
||||||
<< *decay_time();
|
|
||||||
else
|
|
||||||
o << "0,0,0";
|
|
||||||
|
|
||||||
o << ")" << endl;
|
|
||||||
dump_node_pins(o, ind+4);
|
dump_node_pins(o, ind+4);
|
||||||
dump_obj_attr(o, ind+4);
|
dump_obj_attr(o, ind+4);
|
||||||
}
|
}
|
||||||
|
|
@ -1001,8 +989,7 @@ void NetTran::dump_node(ostream&o, unsigned ind) const
|
||||||
void NetUDP::dump_node(ostream&o, unsigned ind) const
|
void NetUDP::dump_node(ostream&o, unsigned ind) const
|
||||||
{
|
{
|
||||||
o << setw(ind) << "" << "UDP (" << udp_name() << "): ";
|
o << setw(ind) << "" << "UDP (" << udp_name() << "): ";
|
||||||
o << " #(" << rise_time() << "," << fall_time() << "," << decay_time() <<
|
o << " #(" << delay_times() << ") " << name() << endl;
|
||||||
") " << name() << endl;
|
|
||||||
|
|
||||||
dump_node_pins(o, ind+4);
|
dump_node_pins(o, ind+4);
|
||||||
dump_obj_attr(o, ind+4);
|
dump_obj_attr(o, ind+4);
|
||||||
|
|
@ -1151,7 +1138,7 @@ void NetAssignNB::dump(ostream&o, unsigned ind) const
|
||||||
if (rval())
|
if (rval())
|
||||||
o << *rval() << ";" << endl;
|
o << *rval() << ";" << endl;
|
||||||
else
|
else
|
||||||
o << "rval elaboration error>;" << endl;
|
o << "<rval elaboration error>;" << endl;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,11 @@ suffix = @install_suffix@
|
||||||
bindir = $(exec_prefix)/bin
|
bindir = $(exec_prefix)/bin
|
||||||
libdir = $(exec_prefix)/lib
|
libdir = $(exec_prefix)/lib
|
||||||
includedir = $(prefix)/include
|
includedir = $(prefix)/include
|
||||||
mandir = @mandir@
|
# This is actually the directory where we install our own header files.
|
||||||
|
# It is a little different from the generic includedir.
|
||||||
|
ivl_includedir = @includedir@/iverilog$(suffix)
|
||||||
|
man1dir = @mandir@/man1
|
||||||
|
docdir = @docdir@
|
||||||
|
|
||||||
dllib=@DLLIB@
|
dllib=@DLLIB@
|
||||||
|
|
||||||
|
|
@ -39,8 +43,11 @@ CC = @CC@
|
||||||
HOSTCC := @CC@
|
HOSTCC := @CC@
|
||||||
WINDRES = @WINDRES@
|
WINDRES = @WINDRES@
|
||||||
INSTALL = @INSTALL@
|
INSTALL = @INSTALL@
|
||||||
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
INSTALL_DATA = @INSTALL_DATA@
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
MAN = @MAN@
|
||||||
|
PS2PDF = @PS2PDF@
|
||||||
|
|
||||||
ifeq (@srcdir@,.)
|
ifeq (@srcdir@,.)
|
||||||
INCLUDE_PATH = -I. -I..
|
INCLUDE_PATH = -I. -I..
|
||||||
|
|
@ -48,19 +55,36 @@ else
|
||||||
INCLUDE_PATH = -I. -I.. -I$(srcdir) -I$(srcdir)/..
|
INCLUDE_PATH = -I. -I.. -I$(srcdir) -I$(srcdir)/..
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CPPFLAGS = $(INCLUDE_PATH) @CPPFLAGS@ @DEFS@
|
CPPFLAGS = @DEFS@ $(INCLUDE_PATH) @CPPFLAGS@
|
||||||
CFLAGS = @WARNING_FLAGS@ @WARNING_FLAGS_CC@ @CFLAGS@
|
CFLAGS = @WARNING_FLAGS@ @WARNING_FLAGS_CC@ @CFLAGS@
|
||||||
CXXFLAGS = @WARNING_FLAGS@ @WARNING_FLAGS_CXX@ @CXXFLAGS@
|
CXXFLAGS = @WARNING_FLAGS@ @WARNING_FLAGS_CXX@ @CXXFLAGS@
|
||||||
LDFLAGS = @LDFLAGS@
|
PICFLAGS = @PICFLAG@
|
||||||
|
LDFLAGS = @rdynamic@ @LDFLAGS@
|
||||||
|
|
||||||
O = main.o res.o
|
O = main.o res.o
|
||||||
|
|
||||||
|
ifeq (@MINGW32@,yes)
|
||||||
all: iverilog-vpi@EXEEXT@
|
all: iverilog-vpi@EXEEXT@
|
||||||
|
else
|
||||||
|
all: iverilog-vpi
|
||||||
|
endif
|
||||||
|
|
||||||
|
INSTALL_DOC =
|
||||||
|
ifneq ($(MAN),none)
|
||||||
|
INSTALL_DOC += installman
|
||||||
|
ifneq ($(PS2PDF),none)
|
||||||
|
ifeq (@MINGW32@,yes)
|
||||||
|
INSTALL_DOC += installpdf
|
||||||
|
all: iverilog-vpi.pdf
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
check: all
|
check: all
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.o config.h iverilog-vpi@EXEEXT@ res.rc
|
rm -f *.o config.h iverilog-vpi@EXEEXT@ iverilog-vpi \
|
||||||
|
iverilog-vpi.man iverilog-vpi.ps iverilog-vpi.pdf res.rc
|
||||||
|
|
||||||
distclean: clean
|
distclean: clean
|
||||||
rm -f Makefile config.log
|
rm -f Makefile config.log
|
||||||
|
|
@ -75,8 +99,24 @@ cppcheck: main.c config.h
|
||||||
Makefile: $(srcdir)/Makefile.in ../config.status
|
Makefile: $(srcdir)/Makefile.in ../config.status
|
||||||
cd ..; ./config.status --file=driver-vpi/$@
|
cd ..; ./config.status --file=driver-vpi/$@
|
||||||
|
|
||||||
|
ifeq (@MINGW32@,yes)
|
||||||
iverilog-vpi@EXEEXT@: $O
|
iverilog-vpi@EXEEXT@: $O
|
||||||
$(CC) $(LDFLAGS) $O -o iverilog-vpi@EXEEXT@ @EXTRALIBS@
|
$(CC) $(LDFLAGS) $O -o iverilog-vpi@EXEEXT@ @EXTRALIBS@
|
||||||
|
endif
|
||||||
|
ifeq (@MINGW32@,no)
|
||||||
|
iverilog-vpi: $(srcdir)/iverilog-vpi.sh ../config.status
|
||||||
|
sed -e 's;@SHARED@;@shared@;' -e 's;@PIC@;@PICFLAG@;' \
|
||||||
|
-e 's;@ENABLE_PLI1@;@LIBVERIUSER@;' \
|
||||||
|
-e 's;@SUFFIX@;$(suffix);' \
|
||||||
|
-e 's;@IVCC@;$(CC);' \
|
||||||
|
-e 's;@IVCXX@;@CXX@;' \
|
||||||
|
-e 's;@IVCFLAGS@;$(CFLAGS);' \
|
||||||
|
-e 's;@IVCXXFLAGS@;$(CXXFLAGS);' \
|
||||||
|
-e 's;@IVCTARGETFLAGS@;@CTARGETFLAGS@;' \
|
||||||
|
-e 's;@INCLUDEDIR@;$(ivl_includedir);' \
|
||||||
|
-e 's;@LIBDIR@;@libdir@;' $< > $@
|
||||||
|
chmod +x $@
|
||||||
|
endif
|
||||||
|
|
||||||
main.o: $(srcdir)/main.c config.h
|
main.o: $(srcdir)/main.c config.h
|
||||||
$(CC) $(CPPFLAGS) $(CFLAGS) -c $(srcdir)/main.c
|
$(CC) $(CPPFLAGS) $(CFLAGS) -c $(srcdir)/main.c
|
||||||
|
|
@ -95,20 +135,39 @@ else
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Windows specific...
|
# Windows specific...
|
||||||
res.rc: $(srcdir)/res.rc.in ../version.exe
|
res.rc: $(srcdir)/res.rc.in ../config.status
|
||||||
sed -e 's;@PRODUCTVERSION@;'`../version.exe '%M,%n,0,0'`';' \
|
cd ..; ./config.status --file=driver-vpi/$@
|
||||||
$(srcdir)/res.rc.in > $@
|
|
||||||
|
|
||||||
res.o: res.rc
|
res.o: res.rc
|
||||||
$(WINDRES) -i res.rc -o res.o
|
$(WINDRES) -i res.rc -o res.o
|
||||||
#
|
#
|
||||||
|
|
||||||
|
iverilog-vpi.man: $(srcdir)/iverilog-vpi.man.in ../config.status
|
||||||
|
cd ..; ./config.status --file=driver-vpi/$@
|
||||||
|
|
||||||
|
iverilog-vpi.ps: iverilog-vpi.man
|
||||||
|
$(MAN) -t ./$< > $@
|
||||||
|
|
||||||
|
iverilog-vpi.pdf: iverilog-vpi.ps
|
||||||
|
$(PS2PDF) $< $@
|
||||||
|
|
||||||
install: all installdirs installfiles
|
install: all installdirs installfiles
|
||||||
|
|
||||||
F = ./iverilog-vpi@EXEEXT@
|
F = $(INSTALL_DOC)
|
||||||
|
ifeq (@MINGW32@,yes)
|
||||||
|
F += ./iverilog-vpi@EXEEXT@
|
||||||
|
endif
|
||||||
|
ifeq (@MINGW32@,no)
|
||||||
|
F += ./iverilog-vpi
|
||||||
|
endif
|
||||||
|
|
||||||
installfiles: $(F) | installdirs
|
installfiles: $(F) | installdirs
|
||||||
|
ifeq (@MINGW32@,yes)
|
||||||
$(INSTALL_PROGRAM) ./iverilog-vpi@EXEEXT@ "$(DESTDIR)$(bindir)/iverilog-vpi$(suffix)@EXEEXT@"
|
$(INSTALL_PROGRAM) ./iverilog-vpi@EXEEXT@ "$(DESTDIR)$(bindir)/iverilog-vpi$(suffix)@EXEEXT@"
|
||||||
|
endif
|
||||||
|
ifeq (@MINGW32@,no)
|
||||||
|
$(INSTALL_SCRIPT) ./iverilog-vpi "$(DESTDIR)$(bindir)/iverilog-vpi$(suffix)"
|
||||||
|
endif
|
||||||
ifeq (@WIN32@,yes)
|
ifeq (@WIN32@,yes)
|
||||||
ifneq ($(HOSTCC),$(CC))
|
ifneq ($(HOSTCC),$(CC))
|
||||||
$(INSTALL_PROGRAM) $(shell $(HOSTCC) --print-file-name=libwinpthread-1.dll) "$(DESTDIR)$(bindir)"
|
$(INSTALL_PROGRAM) $(shell $(HOSTCC) --print-file-name=libwinpthread-1.dll) "$(DESTDIR)$(bindir)"
|
||||||
|
|
@ -117,8 +176,24 @@ ifneq ($(HOSTCC),$(CC))
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
installman: iverilog-vpi.man installdirs
|
||||||
|
$(INSTALL_DATA) iverilog-vpi.man "$(DESTDIR)$(man1dir)/iverilog-vpi$(suffix).1"
|
||||||
|
|
||||||
|
installpdf: iverilog-vpi.pdf installdirs
|
||||||
|
$(INSTALL_DATA) iverilog-vpi.pdf "$(DESTDIR)$(docdir)/iverilog-vpi$(suffix).pdf"
|
||||||
|
|
||||||
installdirs: $(srcdir)/../mkinstalldirs
|
installdirs: $(srcdir)/../mkinstalldirs
|
||||||
$(srcdir)/../mkinstalldirs "$(DESTDIR)$(bindir)"
|
$(srcdir)/../mkinstalldirs \
|
||||||
|
"$(DESTDIR)$(bindir)" \
|
||||||
|
"$(DESTDIR)$(docdir)" \
|
||||||
|
"$(DESTDIR)$(man1dir)"
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
|
ifeq (@MINGW32@,yes)
|
||||||
rm -f $(DESTDIR)$(bindir)/iverilog-vpi$(suffix)@EXEEXT@
|
rm -f $(DESTDIR)$(bindir)/iverilog-vpi$(suffix)@EXEEXT@
|
||||||
|
endif
|
||||||
|
ifeq (@MINGW32@,no)
|
||||||
|
rm -f $(DESTDIR)$(bindir)/iverilog-vpi$(suffix)
|
||||||
|
endif
|
||||||
|
rm -f "$(DESTDIR)$(man1dir)/iverilog-vpi$(suffix).1" \
|
||||||
|
"$(DESTDIR)$(docdir)/iverilog-vpi$(suffix).pdf"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
.TH iverilog-vpi 1 "Jan 13th, 2026" "" "Version %M.%n%E"
|
.TH iverilog-vpi 1 "Jan 13th, 2026" "" "Version @VERSION@"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
iverilog-vpi - Compile front end for VPI modules
|
iverilog-vpi - Compile front end for VPI modules
|
||||||
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
|
# Copyright (c) 1998-2026 Stephen Williams (steve@icarus.com)
|
||||||
|
#
|
||||||
# This source code is free software; you can redistribute it
|
# This source code is free software; you can redistribute it
|
||||||
# and/or modify it in source code form under the terms of the GNU
|
# and/or modify it in source code form under the terms of the GNU
|
||||||
# Library General Public License as published by the Free Software
|
# Library General Public License as published by the Free Software
|
||||||
|
|
@ -17,20 +17,26 @@
|
||||||
#
|
#
|
||||||
SHELL = /bin/sh
|
SHELL = /bin/sh
|
||||||
|
|
||||||
|
EXEEXT = @EXEEXT@
|
||||||
|
ENV_VVP=@ENV_VVP@
|
||||||
|
PATH_SEP=@PATH_SEP@
|
||||||
|
|
||||||
suffix = @install_suffix@
|
suffix = @install_suffix@
|
||||||
|
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
exec_prefix = @exec_prefix@
|
exec_prefix = @exec_prefix@
|
||||||
srcdir = @srcdir@
|
srcdir = @srcdir@
|
||||||
datarootdir = @datarootdir@
|
datarootdir = @datarootdir@
|
||||||
|
builddir=@builddir@
|
||||||
|
top_builddir=@top_builddir@
|
||||||
|
|
||||||
VPATH = $(srcdir)
|
VPATH = $(srcdir)
|
||||||
|
|
||||||
bindir = $(exec_prefix)/bin
|
bindir = $(exec_prefix)/bin
|
||||||
libdir = $(exec_prefix)/lib
|
libdir = $(exec_prefix)/lib
|
||||||
includedir = $(prefix)/include
|
includedir = $(prefix)/include
|
||||||
mandir = @mandir@
|
man1dir = @mandir@/man1
|
||||||
pdfdir = @docdir@
|
docdir = @docdir@
|
||||||
|
|
||||||
dllib=@DLLIB@
|
dllib=@DLLIB@
|
||||||
|
|
||||||
|
|
@ -58,11 +64,22 @@ O = main.o substit.o cflexor.o cfparse.o
|
||||||
all: dep iverilog@EXEEXT@ iverilog.man
|
all: dep iverilog@EXEEXT@ iverilog.man
|
||||||
|
|
||||||
check: all
|
check: all
|
||||||
|
@echo "driver/iverilog: create a vvp file and then run it."
|
||||||
|
@rm -f top.vvp
|
||||||
|
@$(builddir)/iverilog@EXEEXT@ \
|
||||||
|
-B$(top_builddir)$(PATH_SEP)tgt-vvp \
|
||||||
|
-BI$(top_builddir) \
|
||||||
|
-BM$(top_builddir)$(PATH_SEP)vpi \
|
||||||
|
-BP$(top_builddir)$(PATH_SEP)ivlpp \
|
||||||
|
-Bt$(top_builddir)$(PATH_SEP)tgt-vvp \
|
||||||
|
$(verbose) -o top.vvp -s top $(srcdir)/hello_world.v && \
|
||||||
|
$(ENV_VVP) $(top_builddir)/vvp/vvp$(suffix)@EXEEXT@ top.vvp
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.o cflexor.c cfparse.c cfparse.h cfparse.output
|
rm -f *.o cflexor.c cfparse.c cfparse.h cfparse.output
|
||||||
rm -f iverilog@EXEEXT@ iverilog.man iverilog.pdf iverilog.ps
|
rm -f iverilog@EXEEXT@ iverilog.man iverilog.pdf iverilog.ps
|
||||||
rm -rf dep
|
rm -rf dep
|
||||||
|
rm -f top.vvp
|
||||||
|
|
||||||
distclean: clean
|
distclean: clean
|
||||||
rm -f Makefile config.log
|
rm -f Makefile config.log
|
||||||
|
|
@ -92,19 +109,18 @@ cflexor.c: $(srcdir)/cflexor.lex
|
||||||
cfparse%c cfparse%h: $(srcdir)/cfparse%y
|
cfparse%c cfparse%h: $(srcdir)/cfparse%y
|
||||||
$(YACC) --verbose -t -p cf -d -o cfparse.c $<
|
$(YACC) --verbose -t -p cf -d -o cfparse.c $<
|
||||||
|
|
||||||
%.o: %.c
|
%.o: %.c | dep
|
||||||
$(CC) $(CPPFLAGS) $(CFLAGS) @DEPENDENCY_FLAG@ -c $< -o $*.o
|
$(CC) $(CPPFLAGS) $(CFLAGS) @DEPENDENCY_FLAG@ -c $< -o $*.o
|
||||||
mv $*.d dep
|
mv $*.d dep
|
||||||
|
|
||||||
main.o: main.c globals.h $(srcdir)/../version_base.h ../version_tag.h Makefile
|
main.o: main.c globals.h ../version_base.h ../version_tag.h Makefile | dep
|
||||||
$(CC) $(CPPFLAGS) $(CFLAGS) @DEPENDENCY_FLAG@ -c -DIVL_ROOT='"@libdir@/ivl$(suffix)"' -DIVL_SUFFIX='"$(suffix)"' -DIVL_INC='"@includedir@"' -DIVL_LIB='"@libdir@"' -DDLLIB='"@DLLIB@"' -DIVL_INCLUDE_INSTALL_DIR="\"$(realpath $(DESTDIR)/$(includedir))\"" $(srcdir)/main.c
|
$(CC) $(CPPFLAGS) $(CFLAGS) @DEPENDENCY_FLAG@ -c -DIVL_ROOT='"@libdir@/ivl$(suffix)"' -DIVL_SUFFIX='"$(suffix)"' -DIVL_INC='"@includedir@"' -DIVL_LIB='"@libdir@"' -DDLLIB='"@DLLIB@"' -DIVL_INCLUDE_INSTALL_DIR="\"$(realpath $(DESTDIR)/$(includedir))\"" $(srcdir)/main.c
|
||||||
mv $*.d dep
|
mv $*.d dep
|
||||||
|
|
||||||
cflexor.o: cflexor.c cfparse.h
|
cflexor.o: cflexor.c cfparse.h
|
||||||
|
|
||||||
iverilog.man: $(srcdir)/iverilog.man.in ../version.exe
|
iverilog.man: $(srcdir)/iverilog.man.in ../config.status
|
||||||
../version.exe `head -1 $<`'\n' > $@
|
cd ..; ./config.status --file=driver/$@
|
||||||
tail -n +2 $< >> $@
|
|
||||||
|
|
||||||
iverilog.ps: iverilog.man
|
iverilog.ps: iverilog.man
|
||||||
$(MAN) -t ./$< > $@
|
$(MAN) -t ./$< > $@
|
||||||
|
|
@ -112,25 +128,15 @@ iverilog.ps: iverilog.man
|
||||||
iverilog.pdf: iverilog.ps
|
iverilog.pdf: iverilog.ps
|
||||||
$(PS2PDF) $< $@
|
$(PS2PDF) $< $@
|
||||||
|
|
||||||
|
INSTALL_DOC =
|
||||||
|
ifneq ($(MAN),none)
|
||||||
|
INSTALL_DOC += installman
|
||||||
|
ifneq ($(PS2PDF),none)
|
||||||
ifeq (@MINGW32@,yes)
|
ifeq (@MINGW32@,yes)
|
||||||
ifeq ($(MAN),none)
|
INSTALL_DOC += installpdf
|
||||||
INSTALL_DOC = installman
|
|
||||||
INSTALL_PDFDIR = $(prefix)
|
|
||||||
else
|
|
||||||
ifeq ($(PS2PDF),none)
|
|
||||||
INSTALL_DOC = installman
|
|
||||||
INSTALL_PDFDIR = $(prefix)
|
|
||||||
else
|
|
||||||
INSTALL_DOC = installpdf installman
|
|
||||||
INSTALL_PDFDIR = $(pdfdir)
|
|
||||||
all: iverilog.pdf
|
all: iverilog.pdf
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
INSTALL_DOCDIR = $(mandir)/man1
|
|
||||||
else
|
|
||||||
INSTALL_DOC = installman
|
|
||||||
INSTALL_DOCDIR = $(mandir)/man1
|
|
||||||
INSTALL_PDFDIR = $(prefix)
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
install: all installdirs installfiles
|
install: all installdirs installfiles
|
||||||
|
|
@ -139,21 +145,23 @@ F = ./iverilog@EXEEXT@ \
|
||||||
$(INSTALL_DOC)
|
$(INSTALL_DOC)
|
||||||
|
|
||||||
installman: iverilog.man installdirs
|
installman: iverilog.man installdirs
|
||||||
$(INSTALL_DATA) iverilog.man "$(DESTDIR)$(mandir)/man1/iverilog$(suffix).1"
|
$(INSTALL_DATA) iverilog.man "$(DESTDIR)$(man1dir)/iverilog$(suffix).1"
|
||||||
|
|
||||||
installpdf: iverilog.pdf installdirs
|
installpdf: iverilog.pdf installdirs
|
||||||
$(INSTALL_DATA) iverilog.pdf "$(DESTDIR)$(pdfdir)/iverilog$(suffix).pdf"
|
$(INSTALL_DATA) iverilog.pdf "$(DESTDIR)$(docdir)/iverilog$(suffix).pdf"
|
||||||
|
|
||||||
installfiles: $(F) | installdirs
|
installfiles: $(F) | installdirs
|
||||||
$(INSTALL_PROGRAM) ./iverilog@EXEEXT@ "$(DESTDIR)$(bindir)/iverilog$(suffix)@EXEEXT@"
|
$(INSTALL_PROGRAM) ./iverilog@EXEEXT@ "$(DESTDIR)$(bindir)/iverilog$(suffix)@EXEEXT@"
|
||||||
|
|
||||||
installdirs: $(srcdir)/../mkinstalldirs
|
installdirs: $(srcdir)/../mkinstalldirs
|
||||||
$(srcdir)/../mkinstalldirs "$(DESTDIR)$(bindir)" \
|
$(srcdir)/../mkinstalldirs \
|
||||||
"$(DESTDIR)$(INSTALL_DOCDIR)" \
|
"$(DESTDIR)$(bindir)" \
|
||||||
"$(DESTDIR)$(INSTALL_PDFDIR)"
|
"$(DESTDIR)$(docdir)" \
|
||||||
|
"$(DESTDIR)$(man1dir)"
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
rm -f "$(DESTDIR)$(bindir)/iverilog$(suffix)@EXEEXT@"
|
rm -f "$(DESTDIR)$(bindir)/iverilog$(suffix)@EXEEXT@"
|
||||||
rm -f "$(DESTDIR)$(mandir)/man1/iverilog$(suffix).1" "$(DESTDIR)$(pdfdir)/iverilog$(suffix).pdf"
|
rm -f "$(DESTDIR)$(man1dir)/iverilog$(suffix).1" \
|
||||||
|
"$(DESTDIR)$(docdir)/iverilog$(suffix).pdf"
|
||||||
|
|
||||||
-include $(patsubst %.o, dep/%.d, $O)
|
-include $(patsubst %.o, dep/%.d, $O)
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
// cppcheck is wrong this is correct usage
|
// cppcheck is wrong this is correct usage
|
||||||
syntaxError:main.c:405
|
syntaxError:main.c:410
|
||||||
syntaxError:main.c:408
|
syntaxError:main.c:413
|
||||||
|
|
||||||
// cppcheck is missing the code adds a \0 at the previous location.
|
// cppcheck is missing the code adds a \0 at the previous location.
|
||||||
knownConditionTrueFalse:main.c:1086
|
knownConditionTrueFalse:main.c:1123
|
||||||
redundantAssignment:main.c:1085
|
redundantAssignment:main.c:1122
|
||||||
|
|
||||||
// Skip all memory issues since they should be handled by ivl_alloc.h
|
// Skip all memory issues since they should be handled by ivl_alloc.h
|
||||||
memleakOnRealloc
|
memleakOnRealloc
|
||||||
|
|
@ -18,9 +18,12 @@ memleakOnRealloc:cfparse.y
|
||||||
allocaCalled:cfparse.c
|
allocaCalled:cfparse.c
|
||||||
constParameterPointer:cfparse.c
|
constParameterPointer:cfparse.c
|
||||||
constVariablePointer:cfparse.c
|
constVariablePointer:cfparse.c
|
||||||
|
invalidPrintfArgType_sint:cfparse.c
|
||||||
knownConditionTrueFalse:cfparse.c
|
knownConditionTrueFalse:cfparse.c
|
||||||
sizeofwithnumericparameter:cfparse.c
|
sizeofwithnumericparameter:cfparse.c
|
||||||
|
unsignedPositive:cfparse.c
|
||||||
constVariablePointer:<stdout>
|
constVariablePointer:<stdout>
|
||||||
|
duplicateBreak:<stdout>
|
||||||
nullPointer:<stdout>
|
nullPointer:<stdout>
|
||||||
redundantInitialization:<stdout>
|
redundantInitialization:<stdout>
|
||||||
staticFunction:<stdout>
|
staticFunction:<stdout>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
module top;
|
||||||
|
initial $display("Hello World!");
|
||||||
|
endmodule
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
.TH iverilog 1 "Jan 13th, 2026" "" "Version %M.%n%E"
|
.TH iverilog 1 "Jan 13th, 2026" "" "Version @VERSION@"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
iverilog - Icarus Verilog compiler
|
iverilog - Icarus Verilog compiler
|
||||||
|
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.B iverilog
|
.B iverilog
|
||||||
[\-EiRSuVv] [\-Bpath] [\-ccmdfile|\-fcmdfile] [\-Dmacro[=defn]]
|
[\-EiRSuVv] [\-B[IMPVt]path] [\-ccmdfile|\-fcmdfile] [\-Dmacro[=defn]]
|
||||||
[\-Pparameter=value] [\-pflag=value] [\-dname]
|
[\-Pparameter=value] [\-pflag=value] [\-dname]
|
||||||
[\-g1995\:|\-g2001\:|\-g2005\:|\-g2005-sv\:|\-g2009\:|\-g2012\:|\-g<feature>]
|
[\-g1995\:|\-g2001\:|\-g2005\:|\-g2005-sv\:|\-g2009\:|\-g2012\:|\-g2017\:|\-g2023\:|\-g<feature>]
|
||||||
[\-Iincludedir] [\-Lmoduledir] [\-mmodule] [\-M[mode=]file] [\-Nfile]
|
[\-Iincludedir] [\-Lmoduledir] [\-mmodule] [\-M[mode=]file] [\-Nfile]
|
||||||
[\-ooutputfilename] [\-stopmodule] [\-ttype] [\-Tmin/typ/max] [\-Wclass]
|
[\-ooutputfilename] [\-stopmodule] [\-ttype] [\-Tmin/typ/max] [\-Wclass]
|
||||||
[\-ypath] [\-lfile]
|
[\-ypath] [\-lfile]
|
||||||
|
|
@ -21,13 +21,36 @@ further processing. The main target is \fIvvp\fP for simulation.
|
||||||
.SH OPTIONS
|
.SH OPTIONS
|
||||||
\fIiverilog\fP accepts the following options:
|
\fIiverilog\fP accepts the following options:
|
||||||
.TP 8
|
.TP 8
|
||||||
.B -B\fIbase\fP
|
.BI \-B path
|
||||||
The \fIiverilog\fP program uses external programs and configuration
|
The \fIiverilog\fP program uses external programs and configuration
|
||||||
files to preprocess and compile the Verilog source. Normally, the path
|
files to preprocess and compile Verilog source files. Normally, the
|
||||||
used to locate these tools is built into the \fIiverilog\fP
|
paths used to locate these tools are built into the
|
||||||
program. However, the \fB\-B\fP switch allows the user to select a
|
\fIiverilog\fP executable. The \fB\-B\fP option allows the user to
|
||||||
different set of programs. The path given is used to locate
|
override these paths.
|
||||||
\fIivlpp\fP, \fIivl\fP, code generators and the VPI modules.
|
The specified path is used as the default base directory for locating
|
||||||
|
\fIivlpp\fP, \fIivl\fP, code generators, configuration files, and
|
||||||
|
VPI modules.
|
||||||
|
Specialized forms of this option may be used to override individual
|
||||||
|
tool paths:
|
||||||
|
.RS
|
||||||
|
.TP
|
||||||
|
.BI \-BI path
|
||||||
|
Directory for the \fIivl\fP parser.
|
||||||
|
.TP
|
||||||
|
.BI \-BM path
|
||||||
|
Directory for VPI modules.
|
||||||
|
.TP
|
||||||
|
.BI \-BP path
|
||||||
|
Directory for the \fIivlpp\fP preprocessor.
|
||||||
|
.TP
|
||||||
|
.BI \-BV path
|
||||||
|
Directory for the \fIvhdlpp\fP VHDL preprocessor.
|
||||||
|
.TP
|
||||||
|
.BI \-Bt path
|
||||||
|
Directory used to locate target configuration files for the
|
||||||
|
\fB\-t\fP\fItarget\fP option. The configuration file name is
|
||||||
|
\fItarget\fP.conf.
|
||||||
|
.RE
|
||||||
.TP 8
|
.TP 8
|
||||||
.B -c\fIfile\fP -f\fIfile\fP
|
.B -c\fIfile\fP -f\fIfile\fP
|
||||||
These flags specify an input file that contains a list of Verilog
|
These flags specify an input file that contains a list of Verilog
|
||||||
|
|
@ -63,11 +86,11 @@ is the Verilog input, but with file inclusions and macro references
|
||||||
expanded and removed. This is useful, for example, to preprocess
|
expanded and removed. This is useful, for example, to preprocess
|
||||||
Verilog source for use by other compilers.
|
Verilog source for use by other compilers.
|
||||||
.TP 8
|
.TP 8
|
||||||
.B -g1995\fI|\fP-g2001\fI|\fP-g2001-noconfig\fI|\fP-g2005\fI|\fP-g2005-sv\fI|\fP-g2009\fI|\fP-g2012
|
.B -g1995\fI|\fP-g2001\fI|\fP-g2001-noconfig\fI|\fP-g2005\fI|\fP-g2005-sv\fI|\fP-g2009\fI|\fP-g2012\fI|\fP-g2017\fI|\fP-g2023
|
||||||
Select the Verilog language \fIgeneration\fP to support in the compiler.
|
Select the Verilog language \fIgeneration\fP to support in the compiler.
|
||||||
This selects between \fIIEEE1364\-1995\fP, \fIIEEE1364\-2001\fP,
|
This selects between \fIIEEE1364\-1995\fP, \fIIEEE1364\-2001\fP,
|
||||||
\fIIEEE1364\-2005\fP, \fIIEEE1800\-2005\fP, \fIIEEE1800\-2009\fP, or
|
\fIIEEE1364\-2005\fP, \fIIEEE1800\-2005\fP, \fIIEEE1800\-2009\fP,
|
||||||
\fIIEEE1800\-2012\fP.
|
\fIIEEE1800\-2012\fP, \fIIEEE1800\-2017\fP, or \fIIEEE1800\-2023\fP.
|
||||||
Icarus Verilog currently defaults to the \fIIEEE1364\-2005\fP generation
|
Icarus Verilog currently defaults to the \fIIEEE1364\-2005\fP generation
|
||||||
of the language. This flag is used to restrict the language to a set of
|
of the language. This flag is used to restrict the language to a set of
|
||||||
keywords/features, this allows simulation of older Verilog code that may
|
keywords/features, this allows simulation of older Verilog code that may
|
||||||
|
|
@ -124,7 +147,7 @@ to disable extended types if compiling code that clashes with the few
|
||||||
new keywords used to implement the type system.
|
new keywords used to implement the type system.
|
||||||
.TP 8
|
.TP 8
|
||||||
.B -gio-range-error\fI|\fP-gno-io-range-error
|
.B -gio-range-error\fI|\fP-gno-io-range-error
|
||||||
The standards requires that a vectored port have matching ranges for its
|
The standards require that a vectored port have matching ranges for its
|
||||||
port declaration as well as any net/register declaration. It was common
|
port declaration as well as any net/register declaration. It was common
|
||||||
practice in the past to only specify the range for the net/register
|
practice in the past to only specify the range for the net/register
|
||||||
declaration and some tools still allow this. By default any mismatch is
|
declaration and some tools still allow this. By default any mismatch is
|
||||||
|
|
@ -150,6 +173,17 @@ parameter assignment is evaluated as a lossless expression, as is any
|
||||||
expression containing an unsized constant number, and unsized constant
|
expression containing an unsized constant number, and unsized constant
|
||||||
numbers are not truncated to integer width.
|
numbers are not truncated to integer width.
|
||||||
.TP 8
|
.TP 8
|
||||||
|
.B -gstrict-declaration\fI|\fP-gno-strict-declaration
|
||||||
|
.TP 8
|
||||||
|
.B -gstrict-net-var-declaration\fI|\fP-gno-strict-net-var-declaration
|
||||||
|
.TP 8
|
||||||
|
.B -gstrict-parameter-declaration\fI|\fP-gno-strict-parameter-declaration
|
||||||
|
The standards require that nets, variables, and parameters are declared
|
||||||
|
lexically before they are used. Using \fB\-gno\-strict\-declaration\fP
|
||||||
|
will allow using a data object before declaration, with a warning. The
|
||||||
|
warning can be suppressed with -Wno-declaration-after-use. The option
|
||||||
|
can be applied for nets and variables and for parameters separately.
|
||||||
|
.TP 8
|
||||||
.B -gshared-loop-index\fI|\fP-gno-shared-loop-index
|
.B -gshared-loop-index\fI|\fP-gno-shared-loop-index
|
||||||
Enable (default) or disable the exclusion of for-loop control variables
|
Enable (default) or disable the exclusion of for-loop control variables
|
||||||
from implicit event_expression lists. When enabled, if a for-loop control
|
from implicit event_expression lists. When enabled, if a for-loop control
|
||||||
|
|
@ -367,6 +401,11 @@ This enables warnings for creation of implicit declarations. For
|
||||||
example, if a scalar wire X is used but not declared in the Verilog
|
example, if a scalar wire X is used but not declared in the Verilog
|
||||||
source, this will print a warning at its first use.
|
source, this will print a warning at its first use.
|
||||||
|
|
||||||
|
.TP 8
|
||||||
|
.B declaration-after-use
|
||||||
|
This enables warnings for declarations after use, when
|
||||||
|
those are not flagged as errors (default).
|
||||||
|
|
||||||
.TP 8
|
.TP 8
|
||||||
.B macro-redefinition\fI | \fPmacro-replacement
|
.B macro-redefinition\fI | \fPmacro-replacement
|
||||||
This enables preprocessor warnings when a macro is being redefined.
|
This enables preprocessor warnings when a macro is being redefined.
|
||||||
|
|
|
||||||
|
|
@ -38,8 +38,8 @@ const char NOTICE[] =
|
||||||
;
|
;
|
||||||
|
|
||||||
const char HELP[] =
|
const char HELP[] =
|
||||||
"Usage: iverilog [-EiRSuvV] [-B base] [-c cmdfile|-f cmdfile]\n"
|
"Usage: iverilog [-EiRSuvV] [-B[IMPVt] base] [-c cmdfile|-f cmdfile]\n"
|
||||||
" [-g1995|-g2001|-g2005|-g2005-sv|-g2009|-g2012] [-g<feature>]\n"
|
" [-g1995|-g2001|-g2005|-g2005-sv|-g2009|-g2012|-g2017|-g2023] [-g<feature>]\n"
|
||||||
" [-D macro[=defn]] [-I includedir] [-L moduledir]\n"
|
" [-D macro[=defn]] [-I includedir] [-L moduledir]\n"
|
||||||
" [-M [mode=]depfile] [-m module]\n"
|
" [-M [mode=]depfile] [-m module]\n"
|
||||||
" [-N file] [-o filename] [-p flag=value]\n"
|
" [-N file] [-o filename] [-p flag=value]\n"
|
||||||
|
|
@ -69,6 +69,9 @@ const char HELP[] =
|
||||||
# include <libiberty.h>
|
# include <libiberty.h>
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef __APPLE__
|
||||||
|
# include <mach-o/dyld.h>
|
||||||
|
#endif
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
||||||
#ifdef HAVE_GETOPT_H
|
#ifdef HAVE_GETOPT_H
|
||||||
|
|
@ -109,6 +112,8 @@ extern void cfreset(FILE*fd, const char*path);
|
||||||
|
|
||||||
const char*base = 0;
|
const char*base = 0;
|
||||||
const char*vpi_dir = 0;
|
const char*vpi_dir = 0;
|
||||||
|
const char*tconfig_dir = 0;
|
||||||
|
const char*ivl_dir = 0;
|
||||||
const char*ivlpp_dir = 0;
|
const char*ivlpp_dir = 0;
|
||||||
const char*vhdlpp_dir= 0;
|
const char*vhdlpp_dir= 0;
|
||||||
const char*vhdlpp_work = 0;
|
const char*vhdlpp_work = 0;
|
||||||
|
|
@ -134,6 +139,8 @@ const char*gen_strict_ca_eval = "no-strict-ca-eval";
|
||||||
const char*gen_strict_expr_width = "no-strict-expr-width";
|
const char*gen_strict_expr_width = "no-strict-expr-width";
|
||||||
const char*gen_shared_loop_index = "shared-loop-index";
|
const char*gen_shared_loop_index = "shared-loop-index";
|
||||||
const char*gen_verilog_ams = "no-verilog-ams";
|
const char*gen_verilog_ams = "no-verilog-ams";
|
||||||
|
const char*gen_strict_net_var_declaration = "strict-net-var-declaration";
|
||||||
|
const char*gen_strict_parameter_declaration = "strict-parameter-declaration";
|
||||||
|
|
||||||
/* Boolean: true means use a default include dir, false means don't */
|
/* Boolean: true means use a default include dir, false means don't */
|
||||||
int gen_std_include = 1;
|
int gen_std_include = 1;
|
||||||
|
|
@ -142,7 +149,7 @@ int gen_std_include = 1;
|
||||||
of the include list. */
|
of the include list. */
|
||||||
int gen_relative_include = 0;
|
int gen_relative_include = 0;
|
||||||
|
|
||||||
char warning_flags[17] = "n";
|
char warning_flags[18] = "nu";
|
||||||
|
|
||||||
int separate_compilation_flag = 0;
|
int separate_compilation_flag = 0;
|
||||||
|
|
||||||
|
|
@ -335,7 +342,7 @@ static int t_version_only(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
fflush(0);
|
fflush(0);
|
||||||
snprintf(tmp, sizeof tmp, "%s%civl -V -C\"%s\" -C\"%s\"", base, sep,
|
snprintf(tmp, sizeof tmp, "%s%civl -V -C\"%s\" -C\"%s\"", ivl_dir, sep,
|
||||||
iconfig_path, iconfig_common_path);
|
iconfig_path, iconfig_common_path);
|
||||||
rc = system(tmp);
|
rc = system(tmp);
|
||||||
if (rc != 0) {
|
if (rc != 0) {
|
||||||
|
|
@ -442,7 +449,7 @@ static int t_compile(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Build the ivl command. */
|
/* Build the ivl command. */
|
||||||
snprintf(tmp, sizeof tmp, "%s%civl", base, sep);
|
snprintf(tmp, sizeof tmp, "%s%civl", ivl_dir, sep);
|
||||||
rc = strlen(tmp);
|
rc = strlen(tmp);
|
||||||
cmd = realloc(cmd, ncmd+rc+1);
|
cmd = realloc(cmd, ncmd+rc+1);
|
||||||
strcpy(cmd+ncmd, tmp);
|
strcpy(cmd+ncmd, tmp);
|
||||||
|
|
@ -527,6 +534,7 @@ static void process_warning_switch(const char*name)
|
||||||
{
|
{
|
||||||
if (strcmp(name,"all") == 0) {
|
if (strcmp(name,"all") == 0) {
|
||||||
process_warning_switch("anachronisms");
|
process_warning_switch("anachronisms");
|
||||||
|
process_warning_switch("declaration-after-use");
|
||||||
process_warning_switch("implicit");
|
process_warning_switch("implicit");
|
||||||
process_warning_switch("implicit-dimensions");
|
process_warning_switch("implicit-dimensions");
|
||||||
process_warning_switch("macro-replacement");
|
process_warning_switch("macro-replacement");
|
||||||
|
|
@ -537,6 +545,9 @@ static void process_warning_switch(const char*name)
|
||||||
} else if (strcmp(name,"anachronisms") == 0) {
|
} else if (strcmp(name,"anachronisms") == 0) {
|
||||||
if (! strchr(warning_flags, 'n'))
|
if (! strchr(warning_flags, 'n'))
|
||||||
strcat(warning_flags, "n");
|
strcat(warning_flags, "n");
|
||||||
|
} else if (strcmp(name,"declaration-after-use") == 0) {
|
||||||
|
if (! strchr(warning_flags, 'u'))
|
||||||
|
strcat(warning_flags, "u");
|
||||||
} else if (strcmp(name,"floating-nets") == 0) {
|
} else if (strcmp(name,"floating-nets") == 0) {
|
||||||
if (! strchr(warning_flags, 'f'))
|
if (! strchr(warning_flags, 'f'))
|
||||||
strcat(warning_flags, "f");
|
strcat(warning_flags, "f");
|
||||||
|
|
@ -578,6 +589,12 @@ static void process_warning_switch(const char*name)
|
||||||
cp[0] = cp[1];
|
cp[0] = cp[1];
|
||||||
cp += 1;
|
cp += 1;
|
||||||
}
|
}
|
||||||
|
} else if (strcmp(name,"no-declaration-after-use") == 0) {
|
||||||
|
char*cp = strchr(warning_flags, 'u');
|
||||||
|
if (cp) while (*cp) {
|
||||||
|
cp[0] = cp[1];
|
||||||
|
cp += 1;
|
||||||
|
}
|
||||||
} else if (strcmp(name,"no-floating-nets") == 0) {
|
} else if (strcmp(name,"no-floating-nets") == 0) {
|
||||||
char*cp = strchr(warning_flags, 'f');
|
char*cp = strchr(warning_flags, 'f');
|
||||||
if (cp) while (*cp) {
|
if (cp) while (*cp) {
|
||||||
|
|
@ -725,6 +742,12 @@ static int process_generation(const char*name)
|
||||||
else if (strcmp(name,"2012") == 0)
|
else if (strcmp(name,"2012") == 0)
|
||||||
generation = "2012";
|
generation = "2012";
|
||||||
|
|
||||||
|
else if (strcmp(name,"2017") == 0)
|
||||||
|
generation = "2017";
|
||||||
|
|
||||||
|
else if (strcmp(name,"2023") == 0)
|
||||||
|
generation = "2023";
|
||||||
|
|
||||||
else if (strcmp(name,"1") == 0) { /* Deprecated: use 1995 */
|
else if (strcmp(name,"1") == 0) { /* Deprecated: use 1995 */
|
||||||
generation = "1995";
|
generation = "1995";
|
||||||
gen_xtypes = "no-xtypes";
|
gen_xtypes = "no-xtypes";
|
||||||
|
|
@ -815,6 +838,26 @@ static int process_generation(const char*name)
|
||||||
else if (strcmp(name,"no-verilog-ams") == 0)
|
else if (strcmp(name,"no-verilog-ams") == 0)
|
||||||
gen_verilog_ams = "no-verilog-ams";
|
gen_verilog_ams = "no-verilog-ams";
|
||||||
|
|
||||||
|
else if (strcmp(name,"strict-declaration") == 0) {
|
||||||
|
gen_strict_net_var_declaration = "strict-net-var-declaration";
|
||||||
|
gen_strict_parameter_declaration = "strict-parameter-declaration";
|
||||||
|
}
|
||||||
|
else if (strcmp(name,"no-strict-declaration") == 0) {
|
||||||
|
gen_strict_net_var_declaration = "no-strict-net-var-declaration";
|
||||||
|
gen_strict_parameter_declaration = "no-strict-parameter-declaration";
|
||||||
|
}
|
||||||
|
else if (strcmp(name,"strict-net-var-declaration") == 0)
|
||||||
|
gen_strict_net_var_declaration = "strict-net-var-declaration";
|
||||||
|
|
||||||
|
else if (strcmp(name,"no-strict-net-var-declaration") == 0)
|
||||||
|
gen_strict_net_var_declaration = "no-strict-net-var-declaration";
|
||||||
|
|
||||||
|
else if (strcmp(name,"strict-parameter-declaration") == 0)
|
||||||
|
gen_strict_parameter_declaration = "strict-parameter-declaration";
|
||||||
|
|
||||||
|
else if (strcmp(name,"no-strict-parameter-declaration") == 0)
|
||||||
|
gen_strict_parameter_declaration = "no-strict-parameter-declaration";
|
||||||
|
|
||||||
else {
|
else {
|
||||||
fprintf(stderr, "Unknown/Unsupported Language generation "
|
fprintf(stderr, "Unknown/Unsupported Language generation "
|
||||||
"%s\n\n", name);
|
"%s\n\n", name);
|
||||||
|
|
@ -825,6 +868,8 @@ static int process_generation(const char*name)
|
||||||
" 2005-sv -- IEEE1800-2005\n"
|
" 2005-sv -- IEEE1800-2005\n"
|
||||||
" 2009 -- IEEE1800-2009\n"
|
" 2009 -- IEEE1800-2009\n"
|
||||||
" 2012 -- IEEE1800-2012\n"
|
" 2012 -- IEEE1800-2012\n"
|
||||||
|
" 2017 -- IEEE1800-2017\n"
|
||||||
|
" 2023 -- IEEE1800-2023\n"
|
||||||
"Other generation flags:\n"
|
"Other generation flags:\n"
|
||||||
" assertions | supported-assertions | no-assertions\n"
|
" assertions | supported-assertions | no-assertions\n"
|
||||||
" specify | no-specify\n"
|
" specify | no-specify\n"
|
||||||
|
|
@ -837,7 +882,9 @@ static int process_generation(const char*name)
|
||||||
" io-range-error | no-io-range-error\n"
|
" io-range-error | no-io-range-error\n"
|
||||||
" strict-ca-eval | no-strict-ca-eval\n"
|
" strict-ca-eval | no-strict-ca-eval\n"
|
||||||
" strict-expr-width | no-strict-expr-width\n"
|
" strict-expr-width | no-strict-expr-width\n"
|
||||||
" shared-loop-index | no-shared-loop-index\n");
|
" shared-loop-index | no-shared-loop-index\n"
|
||||||
|
" strict-declaration | no-strict-declaration\n"
|
||||||
|
" [no-]strict-[net-var|parameter]-declaration\n");
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
@ -1179,6 +1226,9 @@ int main(int argc, char **argv)
|
||||||
character of the path indicates which path the
|
character of the path indicates which path the
|
||||||
user is specifying. */
|
user is specifying. */
|
||||||
switch (optarg[0]) {
|
switch (optarg[0]) {
|
||||||
|
case 'I': /* Path for the ivl parser */
|
||||||
|
ivl_dir = optarg+1;
|
||||||
|
break;
|
||||||
case 'M': /* Path for the VPI modules */
|
case 'M': /* Path for the VPI modules */
|
||||||
vpi_dir = optarg+1;
|
vpi_dir = optarg+1;
|
||||||
break;
|
break;
|
||||||
|
|
@ -1188,6 +1238,9 @@ int main(int argc, char **argv)
|
||||||
case 'V': /* Path for the vhdlpp VHDL processor */
|
case 'V': /* Path for the vhdlpp VHDL processor */
|
||||||
vhdlpp_dir = optarg+1;
|
vhdlpp_dir = optarg+1;
|
||||||
break;
|
break;
|
||||||
|
case 't': /* Path to target.conf for the -ttarget option */
|
||||||
|
tconfig_dir = optarg+1;
|
||||||
|
break;
|
||||||
default: /* Otherwise, this is a default base. */
|
default: /* Otherwise, this is a default base. */
|
||||||
base=optarg;
|
base=optarg;
|
||||||
break;
|
break;
|
||||||
|
|
@ -1330,8 +1383,12 @@ int main(int argc, char **argv)
|
||||||
vpi_dir = base;
|
vpi_dir = base;
|
||||||
if (ivlpp_dir == 0)
|
if (ivlpp_dir == 0)
|
||||||
ivlpp_dir = base;
|
ivlpp_dir = base;
|
||||||
|
if (ivl_dir == 0)
|
||||||
|
ivl_dir = base;
|
||||||
if (vhdlpp_dir == 0)
|
if (vhdlpp_dir == 0)
|
||||||
vhdlpp_dir = base;
|
vhdlpp_dir = base;
|
||||||
|
if (tconfig_dir == 0)
|
||||||
|
tconfig_dir = base;
|
||||||
|
|
||||||
if (version_flag || verbose_flag) {
|
if (version_flag || verbose_flag) {
|
||||||
printf("Icarus Verilog version " VERSION " (" VERSION_TAG ")\n\n");
|
printf("Icarus Verilog version " VERSION " (" VERSION_TAG ")\n\n");
|
||||||
|
|
@ -1341,7 +1398,7 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
/* Make a common conf file path to reflect the target. */
|
/* Make a common conf file path to reflect the target. */
|
||||||
snprintf(iconfig_common_path, sizeof iconfig_common_path, "%s%c%s%s.conf",
|
snprintf(iconfig_common_path, sizeof iconfig_common_path, "%s%c%s%s.conf",
|
||||||
base, sep, targ, synth_flag? "-s" : "");
|
tconfig_dir, sep, targ, synth_flag? "-s" : "");
|
||||||
|
|
||||||
/* Write values to the iconfig file. */
|
/* Write values to the iconfig file. */
|
||||||
fprintf(iconfig_file, "basedir:%s\n", base);
|
fprintf(iconfig_file, "basedir:%s\n", base);
|
||||||
|
|
@ -1351,11 +1408,13 @@ int main(int argc, char **argv)
|
||||||
fprintf(iconfig_file, "module:%s%cvhdl_sys.vpi\n", vpi_dir, sep);
|
fprintf(iconfig_file, "module:%s%cvhdl_sys.vpi\n", vpi_dir, sep);
|
||||||
fprintf(iconfig_file, "module:%s%cvhdl_textio.vpi\n", vpi_dir, sep);
|
fprintf(iconfig_file, "module:%s%cvhdl_textio.vpi\n", vpi_dir, sep);
|
||||||
|
|
||||||
/* If verilog-2005/09/12 is enabled or icarus-misc or verilog-ams,
|
/* If verilog-2005/09/12/17/23 is enabled or icarus-misc or verilog-ams,
|
||||||
* then include the v2005_math library. */
|
* then include the v2005_math library. */
|
||||||
if (strcmp(generation, "2005") == 0 ||
|
if (strcmp(generation, "2005") == 0 ||
|
||||||
strcmp(generation, "2009") == 0 ||
|
strcmp(generation, "2009") == 0 ||
|
||||||
strcmp(generation, "2012") == 0 ||
|
strcmp(generation, "2012") == 0 ||
|
||||||
|
strcmp(generation, "2017") == 0 ||
|
||||||
|
strcmp(generation, "2023") == 0 ||
|
||||||
strcmp(gen_icarus, "icarus-misc") == 0 ||
|
strcmp(gen_icarus, "icarus-misc") == 0 ||
|
||||||
strcmp(gen_verilog_ams, "verilog-ams") == 0) {
|
strcmp(gen_verilog_ams, "verilog-ams") == 0) {
|
||||||
fprintf(iconfig_file, "module:%s%cv2005_math.vpi\n", vpi_dir, sep);
|
fprintf(iconfig_file, "module:%s%cv2005_math.vpi\n", vpi_dir, sep);
|
||||||
|
|
@ -1370,7 +1429,9 @@ int main(int argc, char **argv)
|
||||||
v2009 module. */
|
v2009 module. */
|
||||||
if (strcmp(generation, "2005-sv") == 0 ||
|
if (strcmp(generation, "2005-sv") == 0 ||
|
||||||
strcmp(generation, "2009") == 0 ||
|
strcmp(generation, "2009") == 0 ||
|
||||||
strcmp(generation, "2012") == 0) {
|
strcmp(generation, "2012") == 0 ||
|
||||||
|
strcmp(generation, "2017") == 0 ||
|
||||||
|
strcmp(generation, "2023") == 0) {
|
||||||
fprintf(iconfig_file, "module:%s%cv2009.vpi\n", vpi_dir, sep);
|
fprintf(iconfig_file, "module:%s%cv2009.vpi\n", vpi_dir, sep);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1385,6 +1446,8 @@ int main(int argc, char **argv)
|
||||||
fprintf(iconfig_file, "generation:%s\n", gen_strict_expr_width);
|
fprintf(iconfig_file, "generation:%s\n", gen_strict_expr_width);
|
||||||
fprintf(iconfig_file, "generation:%s\n", gen_shared_loop_index);
|
fprintf(iconfig_file, "generation:%s\n", gen_shared_loop_index);
|
||||||
fprintf(iconfig_file, "generation:%s\n", gen_verilog_ams);
|
fprintf(iconfig_file, "generation:%s\n", gen_verilog_ams);
|
||||||
|
fprintf(iconfig_file, "generation:%s\n", gen_strict_net_var_declaration);
|
||||||
|
fprintf(iconfig_file, "generation:%s\n", gen_strict_parameter_declaration);
|
||||||
fprintf(iconfig_file, "generation:%s\n", gen_icarus);
|
fprintf(iconfig_file, "generation:%s\n", gen_icarus);
|
||||||
fprintf(iconfig_file, "warnings:%s\n", warning_flags);
|
fprintf(iconfig_file, "warnings:%s\n", warning_flags);
|
||||||
fprintf(iconfig_file, "ignore_missing_modules:%s\n", ignore_missing_modules ? "true" : "false");
|
fprintf(iconfig_file, "ignore_missing_modules:%s\n", ignore_missing_modules ? "true" : "false");
|
||||||
|
|
|
||||||
930
elab_expr.cc
930
elab_expr.cc
File diff suppressed because it is too large
Load Diff
21
elab_lval.cc
21
elab_lval.cc
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2000-2025 Stephen Williams (steve@icarus.com)
|
* Copyright (c) 2000-2026 Stephen Williams (steve@icarus.com)
|
||||||
* Copyright CERN 2012-2013 / Stephen Williams (steve@icarus.com)
|
* Copyright CERN 2012-2013 / Stephen Williams (steve@icarus.com)
|
||||||
*
|
*
|
||||||
* This source code is free software; you can redistribute it
|
* This source code is free software; you can redistribute it
|
||||||
|
|
@ -133,11 +133,13 @@ NetAssign_* PEConcat::elaborate_lval(Design*des,
|
||||||
the compiler catch more errors. */
|
the compiler catch more errors. */
|
||||||
if (tmp == 0) continue;
|
if (tmp == 0) continue;
|
||||||
|
|
||||||
if (tmp->expr_type() == IVL_VT_REAL) {
|
ivl_type_t tmp_type = tmp->net_type();
|
||||||
|
if (tmp_type && !tmp_type->packed()) {
|
||||||
cerr << parms_[idx]->get_fileline() << ": error: "
|
cerr << parms_[idx]->get_fileline() << ": error: "
|
||||||
<< "concatenation operand can not be real: "
|
<< "concatenation operand must be packed: "
|
||||||
<< *parms_[idx] << endl;
|
<< *parms_[idx] << endl;
|
||||||
des->errors += 1;
|
des->errors += 1;
|
||||||
|
delete tmp;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -296,6 +298,15 @@ NetAssign_*PEIdent::elaborate_lval_var_(Design *des, NetScope *scope,
|
||||||
// Past this point, we should have taken care of the cases
|
// Past this point, we should have taken care of the cases
|
||||||
// where the name is a member/method of a struct/class.
|
// where the name is a member/method of a struct/class.
|
||||||
// XXXX ivl_assert(*this, method_name.nil());
|
// XXXX ivl_assert(*this, method_name.nil());
|
||||||
|
if (!tail_path.empty()) {
|
||||||
|
cerr << get_fileline() << ": error: Variable "
|
||||||
|
<< reg->name()
|
||||||
|
<< " does not have a field named: "
|
||||||
|
<< tail_path << "." << endl;
|
||||||
|
des->errors += 1;
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
ivl_assert(*this, tail_path.empty());
|
ivl_assert(*this, tail_path.empty());
|
||||||
|
|
||||||
bool need_const_idx = is_cassign || is_force;
|
bool need_const_idx = is_cassign || is_force;
|
||||||
|
|
@ -881,8 +892,10 @@ bool PEIdent::elaborate_lval_net_idx_(Design*des,
|
||||||
calculate_up_do_width_(des, scope, wid);
|
calculate_up_do_width_(des, scope, wid);
|
||||||
|
|
||||||
NetExpr*base = elab_and_eval(des, scope, index_tail.msb, -1);
|
NetExpr*base = elab_and_eval(des, scope, index_tail.msb, -1);
|
||||||
|
if (!base)
|
||||||
|
return false;
|
||||||
|
|
||||||
if (base && base->expr_type() == IVL_VT_REAL) {
|
if (base->expr_type() == IVL_VT_REAL) {
|
||||||
cerr << get_fileline() << ": error: Indexed part select base "
|
cerr << get_fileline() << ": error: Indexed part select base "
|
||||||
"expression for ";
|
"expression for ";
|
||||||
cerr << lv->sig()->name() << "[" << *base;
|
cerr << lv->sig()->name() << "[" << *base;
|
||||||
|
|
|
||||||
41
elab_net.cc
41
elab_net.cc
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1999-2025 Stephen Williams (steve@icarus.com)
|
* Copyright (c) 1999-2026 Stephen Williams (steve@icarus.com)
|
||||||
* Copyright CERN 2012 / Stephen Williams (steve@icarus.com)
|
* Copyright CERN 2012 / Stephen Williams (steve@icarus.com)
|
||||||
*
|
*
|
||||||
* This source code is free software; you can redistribute it
|
* This source code is free software; you can redistribute it
|
||||||
|
|
@ -83,16 +83,22 @@ NetNet* PEConcat::elaborate_lnet_common_(Design*des, NetScope*scope,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nets[idx] == 0) {
|
if (nets[idx] == 0) {
|
||||||
errors += 1;
|
|
||||||
} else if (nets[idx]->data_type() == IVL_VT_REAL) {
|
|
||||||
cerr << parms_[idx]->get_fileline() << ": error: "
|
|
||||||
<< "concatenation operand can no be real: "
|
|
||||||
<< *parms_[idx] << endl;
|
|
||||||
errors += 1;
|
errors += 1;
|
||||||
continue;
|
|
||||||
} else {
|
} else {
|
||||||
width += nets[idx]->vector_width();
|
ivl_type_t tmp_type = nets[idx]->array_type();
|
||||||
}
|
if (!tmp_type)
|
||||||
|
tmp_type = nets[idx]->net_type();
|
||||||
|
|
||||||
|
if (tmp_type && !tmp_type->packed()) {
|
||||||
|
cerr << parms_[idx]->get_fileline() << ": error: "
|
||||||
|
<< "concatenation operand must be packed: "
|
||||||
|
<< *parms_[idx] << endl;
|
||||||
|
errors += 1;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
width += nets[idx]->vector_width();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (errors) {
|
if (errors) {
|
||||||
|
|
@ -557,6 +563,9 @@ NetNet* PEIdent::elaborate_lnet_common_(Design*des, NetScope*scope,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!check_interface_modport_access(this, des, sr, true))
|
||||||
|
return 0;
|
||||||
|
|
||||||
if (debug_elaborate) {
|
if (debug_elaborate) {
|
||||||
cerr << get_fileline() << ": " << __func__ << ": "
|
cerr << get_fileline() << ": " << __func__ << ": "
|
||||||
<< "Found l-value path_=" << path_
|
<< "Found l-value path_=" << path_
|
||||||
|
|
@ -616,6 +625,9 @@ NetNet* PEIdent::elaborate_lnet_common_(Design*des, NetScope*scope,
|
||||||
// array word assignment.
|
// array word assignment.
|
||||||
bool widx_flag = false;
|
bool widx_flag = false;
|
||||||
|
|
||||||
|
// Whether the signal is an array
|
||||||
|
const bool sig_is_array = sig->unpacked_dimensions() > 0;
|
||||||
|
|
||||||
// Detect the net is a structure and there was a method path
|
// Detect the net is a structure and there was a method path
|
||||||
// detected. We have already broken the path_ into the path to
|
// detected. We have already broken the path_ into the path to
|
||||||
// the net, and the path of member names. For example, if the
|
// the net, and the path of member names. For example, if the
|
||||||
|
|
@ -751,7 +763,7 @@ NetNet* PEIdent::elaborate_lnet_common_(Design*des, NetScope*scope,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (gn_system_verilog() && sig->unpacked_dimensions() > 0 && path_tail.index.empty()) {
|
} else if (gn_system_verilog() && sig_is_array && path_tail.index.empty()) {
|
||||||
|
|
||||||
// In this case, we are doing a continuous assignment to
|
// In this case, we are doing a continuous assignment to
|
||||||
// an unpacked array. The NetNet representation is a
|
// an unpacked array. The NetNet representation is a
|
||||||
|
|
@ -761,15 +773,14 @@ NetNet* PEIdent::elaborate_lnet_common_(Design*des, NetScope*scope,
|
||||||
// This can come up from code like this:
|
// This can come up from code like this:
|
||||||
// logic [...] data [0:3];
|
// logic [...] data [0:3];
|
||||||
// assign data = ...;
|
// assign data = ...;
|
||||||
// In this case, "sig" is "data", and sig->pin_count()
|
// In this case, "sig" is "data".
|
||||||
// is 4 to account for the unpacked size.
|
|
||||||
if (debug_elaborate) {
|
if (debug_elaborate) {
|
||||||
cerr << get_fileline() << ": PEIdent::elaborate_lnet_common_: "
|
cerr << get_fileline() << ": PEIdent::elaborate_lnet_common_: "
|
||||||
<< "Net assign to unpacked array \"" << sig->name()
|
<< "Net assign to unpacked array \"" << sig->name()
|
||||||
<< "\" with " << sig->pin_count() << " elements." << endl;
|
<< "\" with " << sig->pin_count() << " elements." << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (sig->unpacked_dimensions() > 0) {
|
} else if (sig_is_array) {
|
||||||
|
|
||||||
list<long> unpacked_indices_const;
|
list<long> unpacked_indices_const;
|
||||||
|
|
||||||
|
|
@ -931,7 +942,7 @@ NetNet* PEIdent::elaborate_lnet_common_(Design*des, NetScope*scope,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sig->pin_count() > 1 && widx_flag) {
|
if (sig_is_array && widx_flag) {
|
||||||
if (widx < 0 || widx >= (long) sig->pin_count())
|
if (widx < 0 || widx >= (long) sig->pin_count())
|
||||||
return 0;
|
return 0;
|
||||||
NetNet*tmp = new NetNet(scope, scope->local_symbol(),
|
NetNet*tmp = new NetNet(scope, scope->local_symbol(),
|
||||||
|
|
@ -941,7 +952,7 @@ NetNet* PEIdent::elaborate_lnet_common_(Design*des, NetScope*scope,
|
||||||
connect(sig->pin(widx), tmp->pin(0));
|
connect(sig->pin(widx), tmp->pin(0));
|
||||||
sig = tmp;
|
sig = tmp;
|
||||||
|
|
||||||
} else if (sig->pin_count() > 1) {
|
} else if (sig_is_array) {
|
||||||
|
|
||||||
// If this turns out to be an l-value unpacked array,
|
// If this turns out to be an l-value unpacked array,
|
||||||
// then let the caller handle it. It will probably be
|
// then let the caller handle it. It will probably be
|
||||||
|
|
|
||||||
|
|
@ -1322,6 +1322,10 @@ void PGenerate::elaborate_subscope_(Design*des, NetScope*scope)
|
||||||
|
|
||||||
collect_scope_signals(scope, wires);
|
collect_scope_signals(scope, wires);
|
||||||
|
|
||||||
|
elaborate_scope_enumerations(des, scope, enum_sets);
|
||||||
|
|
||||||
|
elaborate_scope_classes(des, scope, classes_lexical);
|
||||||
|
|
||||||
// Run through the defparams for this scope and save the result
|
// Run through the defparams for this scope and save the result
|
||||||
// in a table for later final override.
|
// in a table for later final override.
|
||||||
|
|
||||||
|
|
@ -1662,6 +1666,8 @@ void PFunction::elaborate_scope(Design*des, NetScope*scope) const
|
||||||
|
|
||||||
collect_scope_signals(scope, wires);
|
collect_scope_signals(scope, wires);
|
||||||
|
|
||||||
|
elaborate_scope_enumerations(des, scope, enum_sets);
|
||||||
|
|
||||||
// Scan through all the named events in this scope.
|
// Scan through all the named events in this scope.
|
||||||
elaborate_scope_events_(des, scope, events);
|
elaborate_scope_events_(des, scope, events);
|
||||||
|
|
||||||
|
|
@ -1682,6 +1688,8 @@ void PTask::elaborate_scope(Design*des, NetScope*scope) const
|
||||||
|
|
||||||
collect_scope_signals(scope, wires);
|
collect_scope_signals(scope, wires);
|
||||||
|
|
||||||
|
elaborate_scope_enumerations(des, scope, enum_sets);
|
||||||
|
|
||||||
// Scan through all the named events in this scope.
|
// Scan through all the named events in this scope.
|
||||||
elaborate_scope_events_(des, scope, events);
|
elaborate_scope_events_(des, scope, events);
|
||||||
|
|
||||||
|
|
@ -1732,6 +1740,8 @@ void PBlock::elaborate_scope(Design*des, NetScope*scope) const
|
||||||
|
|
||||||
collect_scope_signals(my_scope, wires);
|
collect_scope_signals(my_scope, wires);
|
||||||
|
|
||||||
|
elaborate_scope_enumerations(des, my_scope, enum_sets);
|
||||||
|
|
||||||
// Scan through all the named events in this scope.
|
// Scan through all the named events in this scope.
|
||||||
elaborate_scope_events_(des, my_scope, events);
|
elaborate_scope_events_(des, my_scope, events);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
26
elab_sig.cc
26
elab_sig.cc
|
|
@ -44,6 +44,7 @@
|
||||||
# include "netqueue.h"
|
# include "netqueue.h"
|
||||||
# include "netscalar.h"
|
# include "netscalar.h"
|
||||||
# include "util.h"
|
# include "util.h"
|
||||||
|
# include "parse_api.h"
|
||||||
# include "ivl_assert.h"
|
# include "ivl_assert.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
@ -298,6 +299,12 @@ bool Module::elaborate_sig(Design*des, NetScope*scope) const
|
||||||
if (pp == 0)
|
if (pp == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (pp->is_interface_port()) {
|
||||||
|
interface_formal_port_t formal;
|
||||||
|
resolve_interface_formal_port(this, des, pp, formal, true);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// The port has a name and an array of expressions. The
|
// The port has a name and an array of expressions. The
|
||||||
// expression are all identifiers that should reference
|
// expression are all identifiers that should reference
|
||||||
// wires within the scope.
|
// wires within the scope.
|
||||||
|
|
@ -397,11 +404,6 @@ void netclass_t::elaborate_sig(Design*des, PClass*pclass)
|
||||||
<< " type=" << *use_type << endl;
|
<< " type=" << *use_type << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dynamic_cast<const netqueue_t *> (use_type)) {
|
|
||||||
cerr << cur->second.get_fileline() << ": sorry: "
|
|
||||||
<< "Queues inside classes are not yet supported." << endl;
|
|
||||||
des->errors++;
|
|
||||||
}
|
|
||||||
set_property(cur->first, cur->second.qual, use_type);
|
set_property(cur->first, cur->second.qual, use_type);
|
||||||
|
|
||||||
if (! cur->second.qual.test_static())
|
if (! cur->second.qual.test_static())
|
||||||
|
|
@ -456,6 +458,12 @@ bool PGModule::elaborate_sig_mod_(Design*des, NetScope*scope,
|
||||||
|
|
||||||
NetScope::scope_vec_t instance = scope->instance_arrays[get_name()];
|
NetScope::scope_vec_t instance = scope->instance_arrays[get_name()];
|
||||||
|
|
||||||
|
vector<PExpr*>pins (rmod->port_count());
|
||||||
|
vector<bool>pins_fromwc (rmod->port_count(), false);
|
||||||
|
vector<bool>pins_is_explicitly_not_connected (rmod->port_count(), false);
|
||||||
|
flag &= match_module_ports_(des, rmod, scope, pins, pins_fromwc,
|
||||||
|
pins_is_explicitly_not_connected);
|
||||||
|
|
||||||
for (unsigned idx = 0 ; idx < instance.size() ; idx += 1) {
|
for (unsigned idx = 0 ; idx < instance.size() ; idx += 1) {
|
||||||
// I know a priori that the elaborate_scope created the scope
|
// I know a priori that the elaborate_scope created the scope
|
||||||
// already, so just look it up as a child of the current scope.
|
// already, so just look it up as a child of the current scope.
|
||||||
|
|
@ -471,6 +479,9 @@ bool PGModule::elaborate_sig_mod_(Design*des, NetScope*scope,
|
||||||
}
|
}
|
||||||
ivl_assert(*this, my_scope->parent() == scope);
|
ivl_assert(*this, my_scope->parent() == scope);
|
||||||
|
|
||||||
|
if (!bind_interface_ports_(des, rmod, scope, my_scope, pins, pins_fromwc))
|
||||||
|
flag = false;
|
||||||
|
|
||||||
if (! rmod->elaborate_sig(des, my_scope))
|
if (! rmod->elaborate_sig(des, my_scope))
|
||||||
flag = false;
|
flag = false;
|
||||||
|
|
||||||
|
|
@ -591,6 +602,7 @@ bool PGenerate::elaborate_sig_(Design*des, NetScope*scope) const
|
||||||
|
|
||||||
elaborate_sig_funcs(des, scope, funcs);
|
elaborate_sig_funcs(des, scope, funcs);
|
||||||
elaborate_sig_tasks(des, scope, tasks);
|
elaborate_sig_tasks(des, scope, tasks);
|
||||||
|
elaborate_sig_classes(des, scope, classes);
|
||||||
|
|
||||||
typedef list<PGenerate*>::const_iterator generate_it_t;
|
typedef list<PGenerate*>::const_iterator generate_it_t;
|
||||||
for (generate_it_t cur = generate_schemes.begin()
|
for (generate_it_t cur = generate_schemes.begin()
|
||||||
|
|
@ -1181,8 +1193,8 @@ NetNet* PWire::elaborate_sig(Design*des, NetScope*scope)
|
||||||
pull = new NetLogic(scope, scope->local_symbol(),
|
pull = new NetLogic(scope, scope->local_symbol(),
|
||||||
1, pull_type, wid);
|
1, pull_type, wid);
|
||||||
pull->set_line(*this);
|
pull->set_line(*this);
|
||||||
pull->pin(0).drive0(IVL_DR_SUPPLY);
|
pull->pin(0).drive(drive_strength_t(IVL_DR_SUPPLY,
|
||||||
pull->pin(0).drive1(IVL_DR_SUPPLY);
|
IVL_DR_SUPPLY));
|
||||||
des->add_node(pull);
|
des->add_node(pull);
|
||||||
wtype = NetNet::WIRE;
|
wtype = NetNet::WIRE;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
34
elab_type.cc
34
elab_type.cc
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2012-2024 Stephen Williams (steve@icarus.com)
|
* Copyright (c) 2012-2026 Stephen Williams (steve@icarus.com)
|
||||||
*
|
*
|
||||||
* This source code is free software; you can redistribute it
|
* This source code is free software; you can redistribute it
|
||||||
* and/or modify it in source code form under the terms of the GNU
|
* and/or modify it in source code form under the terms of the GNU
|
||||||
|
|
@ -220,11 +220,13 @@ ivl_type_t struct_type_t::elaborate_type_raw(Design*des, NetScope*scope) const
|
||||||
|
|
||||||
res->set_line(*this);
|
res->set_line(*this);
|
||||||
|
|
||||||
res->packed(packed_flag);
|
bool is_packed = packed_flag || (union_flag && soft_flag);
|
||||||
|
res->packed(is_packed);
|
||||||
res->set_signed(signed_flag);
|
res->set_signed(signed_flag);
|
||||||
|
|
||||||
if (union_flag)
|
if (union_flag) {
|
||||||
res->union_flag(true);
|
res->union_flag(true, soft_flag);
|
||||||
|
}
|
||||||
|
|
||||||
for (list<struct_member_t*>::iterator cur = members->begin()
|
for (list<struct_member_t*>::iterator cur = members->begin()
|
||||||
; cur != members->end() ; ++ cur) {
|
; cur != members->end() ; ++ cur) {
|
||||||
|
|
@ -242,7 +244,7 @@ ivl_type_t struct_type_t::elaborate_type_raw(Design*des, NetScope*scope) const
|
||||||
; cur_name != curp->names->end() ; ++ cur_name) {
|
; cur_name != curp->names->end() ; ++ cur_name) {
|
||||||
decl_assignment_t*namep = *cur_name;
|
decl_assignment_t*namep = *cur_name;
|
||||||
|
|
||||||
if (packed_flag && namep->expr) {
|
if (is_packed && namep->expr) {
|
||||||
cerr << namep->expr->get_fileline() << " error: "
|
cerr << namep->expr->get_fileline() << " error: "
|
||||||
<< "Packed structs must not have default member values."
|
<< "Packed structs must not have default member values."
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|
@ -450,27 +452,7 @@ ivl_type_t typedef_t::elaborate_type(Design *des, NetScope *scope)
|
||||||
if (!elab_type)
|
if (!elab_type)
|
||||||
return netvector_t::integer_type();
|
return netvector_t::integer_type();
|
||||||
|
|
||||||
bool type_ok = true;
|
bool type_ok = basic_type.matches(elab_type);
|
||||||
switch (basic_type) {
|
|
||||||
case ENUM:
|
|
||||||
type_ok = dynamic_cast<const netenum_t *>(elab_type);
|
|
||||||
break;
|
|
||||||
case STRUCT: {
|
|
||||||
const netstruct_t *struct_type = dynamic_cast<const netstruct_t *>(elab_type);
|
|
||||||
type_ok = struct_type && !struct_type->union_flag();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case UNION: {
|
|
||||||
const netstruct_t *struct_type = dynamic_cast<const netstruct_t *>(elab_type);
|
|
||||||
type_ok = struct_type && struct_type->union_flag();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case CLASS:
|
|
||||||
type_ok = dynamic_cast<const netclass_t *>(elab_type);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!type_ok) {
|
if (!type_ok) {
|
||||||
cerr << data_type->get_fileline() << " error: "
|
cerr << data_type->get_fileline() << " error: "
|
||||||
|
|
|
||||||
766
elaborate.cc
766
elaborate.cc
File diff suppressed because it is too large
Load Diff
20
eval_tree.cc
20
eval_tree.cc
|
|
@ -26,6 +26,7 @@
|
||||||
# include <cmath>
|
# include <cmath>
|
||||||
|
|
||||||
# include "netlist.h"
|
# include "netlist.h"
|
||||||
|
# include "netclass.h"
|
||||||
# include "ivl_assert.h"
|
# include "ivl_assert.h"
|
||||||
# include "netmisc.h"
|
# include "netmisc.h"
|
||||||
|
|
||||||
|
|
@ -2182,6 +2183,25 @@ static bool get_array_info(const NetExpr*arg, long dim,
|
||||||
left = range.get_msb();
|
left = range.get_msb();
|
||||||
right = range.get_lsb();
|
right = range.get_lsb();
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
/* Class property (e.g. queue field): size is dynamic; defer to runtime
|
||||||
|
* instead of folding to all-X in evaluate_array_funcs_. */
|
||||||
|
if (const NetEProperty*prop = dynamic_cast<const NetEProperty*>(arg)) {
|
||||||
|
const NetNet*obj = prop->get_sig();
|
||||||
|
const netclass_t*cls = dynamic_cast<const netclass_t*>(obj->net_type());
|
||||||
|
if (cls == 0) return true;
|
||||||
|
ivl_type_t ptype = cls->get_prop_type(prop->property_idx());
|
||||||
|
if (ptype == 0) return true;
|
||||||
|
switch (ptype->base_type()) {
|
||||||
|
case IVL_VT_DARRAY:
|
||||||
|
case IVL_VT_QUEUE:
|
||||||
|
case IVL_VT_STRING:
|
||||||
|
defer = true;
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
/* The argument must be a signal that has enough dimensions. */
|
/* The argument must be a signal that has enough dimensions. */
|
||||||
const NetESignal*esig = dynamic_cast<const NetESignal*>(arg);
|
const NetESignal*esig = dynamic_cast<const NetESignal*>(arg);
|
||||||
|
|
|
||||||
1
ivl.def
1
ivl.def
|
|
@ -337,6 +337,7 @@ ivl_type_packed_width
|
||||||
ivl_type_prop_name
|
ivl_type_prop_name
|
||||||
ivl_type_prop_type
|
ivl_type_prop_type
|
||||||
ivl_type_properties
|
ivl_type_properties
|
||||||
|
ivl_type_queue_max
|
||||||
ivl_type_signed
|
ivl_type_signed
|
||||||
|
|
||||||
ivl_udp_init
|
ivl_udp_init
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef IVL_ivl_dlfcn_H
|
#ifndef IVL_ivl_dlfcn_H
|
||||||
#define IVL_ivl_dlfcn_H
|
#define IVL_ivl_dlfcn_H
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001-2014 Stephen Williams (steve@icarus.com)
|
* Copyright (c) 2001-2026 Stephen Williams (steve@icarus.com)
|
||||||
*
|
*
|
||||||
* This source code is free software; you can redistribute it
|
* This source code is free software; you can redistribute it
|
||||||
* and/or modify it in source code form under the terms of the GNU
|
* and/or modify it in source code form under the terms of the GNU
|
||||||
|
|
@ -21,7 +21,11 @@
|
||||||
|
|
||||||
#if defined(__MINGW32__)
|
#if defined(__MINGW32__)
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
|
#if defined(__cplusplus)
|
||||||
# include <cstdio>
|
# include <cstdio>
|
||||||
|
#else
|
||||||
|
# include <stdio.h>
|
||||||
|
#endif
|
||||||
typedef void * ivl_dll_t;
|
typedef void * ivl_dll_t;
|
||||||
#elif defined(HAVE_DLFCN_H)
|
#elif defined(HAVE_DLFCN_H)
|
||||||
# include <dlfcn.h>
|
# include <dlfcn.h>
|
||||||
|
|
@ -32,7 +36,7 @@ typedef shl_t ivl_dll_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__MINGW32__)
|
#if defined(__MINGW32__)
|
||||||
inline ivl_dll_t ivl_dlopen(const char *name, bool)
|
static inline ivl_dll_t ivl_dlopen(const char *name, bool global_flag)
|
||||||
{
|
{
|
||||||
static char full_name[4096];
|
static char full_name[4096];
|
||||||
unsigned long length = GetFullPathName(name, sizeof(full_name),
|
unsigned long length = GetFullPathName(name, sizeof(full_name),
|
||||||
|
|
@ -40,16 +44,18 @@ inline ivl_dll_t ivl_dlopen(const char *name, bool)
|
||||||
if ((length == 0) || (length > sizeof(full_name)))
|
if ((length == 0) || (length > sizeof(full_name)))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
(void)global_flag;
|
||||||
|
|
||||||
return (void *)LoadLibrary(full_name);
|
return (void *)LoadLibrary(full_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void *ivl_dlsym(ivl_dll_t dll, const char *nm)
|
static inline void *ivl_dlsym(ivl_dll_t dll, const char *nm)
|
||||||
{ return (void *)GetProcAddress((HINSTANCE)dll,nm);}
|
{ return (void *)GetProcAddress((HINSTANCE)dll,nm);}
|
||||||
|
|
||||||
inline void ivl_dlclose(ivl_dll_t dll)
|
static inline void ivl_dlclose(ivl_dll_t dll)
|
||||||
{ (void)FreeLibrary((HINSTANCE)dll);}
|
{ (void)FreeLibrary((HINSTANCE)dll);}
|
||||||
|
|
||||||
inline const char *dlerror(void)
|
static inline const char *dlerror(void)
|
||||||
{
|
{
|
||||||
static char msg[256];
|
static char msg[256];
|
||||||
unsigned long err = GetLastError();
|
unsigned long err = GetLastError();
|
||||||
|
|
@ -66,10 +72,10 @@ inline const char *dlerror(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif defined(HAVE_DLFCN_H)
|
#elif defined(HAVE_DLFCN_H)
|
||||||
inline ivl_dll_t ivl_dlopen(const char*name, bool global_flag)
|
static inline ivl_dll_t ivl_dlopen(const char*name, bool global_flag)
|
||||||
{ return dlopen(name,RTLD_LAZY|(global_flag?RTLD_GLOBAL:0)); }
|
{ return dlopen(name,RTLD_LAZY|(global_flag?RTLD_GLOBAL:0)); }
|
||||||
|
|
||||||
inline void* ivl_dlsym(ivl_dll_t dll, const char*nm)
|
static inline void* ivl_dlsym(ivl_dll_t dll, const char*nm)
|
||||||
{
|
{
|
||||||
void*sym = dlsym(dll, nm);
|
void*sym = dlsym(dll, nm);
|
||||||
/* Not found? try without the leading _ */
|
/* Not found? try without the leading _ */
|
||||||
|
|
@ -78,24 +84,28 @@ inline void* ivl_dlsym(ivl_dll_t dll, const char*nm)
|
||||||
return sym;
|
return sym;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void ivl_dlclose(ivl_dll_t dll)
|
static inline void ivl_dlclose(ivl_dll_t dll)
|
||||||
{ dlclose(dll); }
|
{ dlclose(dll); }
|
||||||
|
|
||||||
#elif defined(HAVE_DL_H)
|
#elif defined(HAVE_DL_H)
|
||||||
inline ivl_dll_t ivl_dlopen(const char*name)
|
static inline ivl_dll_t ivl_dlopen(const char*name, bool global_flag)
|
||||||
{ return shl_load(name, BIND_IMMEDIATE, 0); }
|
{
|
||||||
|
(void)global_flag;
|
||||||
|
|
||||||
inline void* ivl_dlsym(ivl_dll_t dll, const char*nm)
|
return shl_load(name, BIND_IMMEDIATE, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void* ivl_dlsym(ivl_dll_t dll, const char*nm)
|
||||||
{
|
{
|
||||||
void*sym;
|
void*sym;
|
||||||
int rc = shl_findsym(&dll, nm, TYPE_PROCEDURE, &sym);
|
int rc = shl_findsym(&dll, nm, TYPE_PROCEDURE, &sym);
|
||||||
return (rc == 0) ? sym : 0;
|
return (rc == 0) ? sym : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void ivl_dlclose(ivl_dll_t dll)
|
static inline void ivl_dlclose(ivl_dll_t dll)
|
||||||
{ shl_unload(dll); }
|
{ shl_unload(dll); }
|
||||||
|
|
||||||
inline const char*dlerror(void)
|
static inline const char*dlerror(void)
|
||||||
{ return strerror( errno ); }
|
{ return strerror( errno ); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -2400,6 +2400,10 @@ extern int ivl_type_properties(ivl_type_t net);
|
||||||
extern const char* ivl_type_prop_name(ivl_type_t net, int idx);
|
extern const char* ivl_type_prop_name(ivl_type_t net, int idx);
|
||||||
extern ivl_type_t ivl_type_prop_type(ivl_type_t net, int idx);
|
extern ivl_type_t ivl_type_prop_type(ivl_type_t net, int idx);
|
||||||
|
|
||||||
|
/* Maximum element count for a queue type (0 = unbounded). Only valid
|
||||||
|
* when ivl_type_base(net) == IVL_VT_QUEUE. */
|
||||||
|
extern unsigned ivl_type_queue_max(ivl_type_t net);
|
||||||
|
|
||||||
|
|
||||||
#if defined(__MINGW32__) || defined (__CYGWIN__)
|
#if defined(__MINGW32__) || defined (__CYGWIN__)
|
||||||
# define DLLEXPORT __declspec(dllexport)
|
# define DLLEXPORT __declspec(dllexport)
|
||||||
|
|
|
||||||
|
|
@ -89,4 +89,4 @@ uninstall:
|
||||||
rm -f "$(DESTDIR)$(libdir)/ivl$(suffix)/ivlpp@EXEEXT@"
|
rm -f "$(DESTDIR)$(libdir)/ivl$(suffix)/ivlpp@EXEEXT@"
|
||||||
|
|
||||||
lexor.o: lexor.c globals.h
|
lexor.o: lexor.c globals.h
|
||||||
main.o: main.c globals.h $(srcdir)/../version_base.h ../version_tag.h
|
main.o: main.c globals.h ../version_base.h ../version_tag.h
|
||||||
|
|
|
||||||
|
|
@ -1599,10 +1599,10 @@ static void macro_start_args(void)
|
||||||
* entry for arg 0. This will be used by macro_finish_arg() to
|
* entry for arg 0. This will be used by macro_finish_arg() to
|
||||||
* calculate the buffer location for arg 1.
|
* calculate the buffer location for arg 1.
|
||||||
*/
|
*/
|
||||||
if (def_buf) {
|
def_buf_grow_to_fit(1);
|
||||||
def_buf_free = def_buf_size - 1;
|
def_buf_free = def_buf_size - 1;
|
||||||
def_buf[0] = 0;
|
def_buf[0] = 0;
|
||||||
}
|
|
||||||
def_argo[0] = 0;
|
def_argo[0] = 0;
|
||||||
def_argl[0] = 0;
|
def_argl[0] = 0;
|
||||||
def_argc = 1;
|
def_argc = 1;
|
||||||
|
|
@ -1692,7 +1692,6 @@ static void expand_using_args(void)
|
||||||
char* head;
|
char* head;
|
||||||
char* tail;
|
char* tail;
|
||||||
char* dest;
|
char* dest;
|
||||||
int arg;
|
|
||||||
int length;
|
int length;
|
||||||
|
|
||||||
if (def_argc > cur_macro->argc) {
|
if (def_argc > cur_macro->argc) {
|
||||||
|
|
@ -1721,7 +1720,7 @@ static void expand_using_args(void)
|
||||||
if (*tail != ARG_MARK) {
|
if (*tail != ARG_MARK) {
|
||||||
tail++;
|
tail++;
|
||||||
} else {
|
} else {
|
||||||
arg = tail[1]; assert(arg < def_argc);
|
int arg = tail[1]; assert(arg < def_argc);
|
||||||
|
|
||||||
const char*use_argv;
|
const char*use_argv;
|
||||||
int use_argl;
|
int use_argl;
|
||||||
|
|
@ -2369,6 +2368,8 @@ void reset_lexor(FILE* out, char* paths[])
|
||||||
isp->stringify_flag = 0;
|
isp->stringify_flag = 0;
|
||||||
isp->comment = NULL;
|
isp->comment = NULL;
|
||||||
|
|
||||||
|
yyout = out;
|
||||||
|
|
||||||
if (isp->file == 0) {
|
if (isp->file == 0) {
|
||||||
perror(paths[0]);
|
perror(paths[0]);
|
||||||
error_count += 1;
|
error_count += 1;
|
||||||
|
|
@ -2383,8 +2384,6 @@ void reset_lexor(FILE* out, char* paths[])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
yyout = out;
|
|
||||||
|
|
||||||
yyrestart(isp->file);
|
yyrestart(isp->file);
|
||||||
|
|
||||||
assert(istack == 0);
|
assert(istack == 0);
|
||||||
|
|
|
||||||
|
|
@ -34,4 +34,5 @@ tmp_blif.vvp
|
||||||
dump.vcd
|
dump.vcd
|
||||||
dump.lxt
|
dump.lxt
|
||||||
dump.lx2
|
dump.lx2
|
||||||
|
dump.fst
|
||||||
foo.vcd
|
foo.vcd
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,70 @@
|
||||||
|
#
|
||||||
|
# This source code is free software; you can redistribute it
|
||||||
|
# and/or modify it in source code form under the terms of the GNU
|
||||||
|
# Library General Public License as published by the Free Software
|
||||||
|
# Foundation; either version 2 of the License, or (at your option)
|
||||||
|
# any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU Library General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Library General Public
|
||||||
|
# License along with this program; if not, write to the Free
|
||||||
|
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
# Boston, MA 02110-1301, USA.
|
||||||
|
#
|
||||||
|
SHELL = /bin/sh
|
||||||
|
|
||||||
|
abs_srcdir=@abs_srcdir@
|
||||||
|
srcdir=@srcdir@
|
||||||
|
suffix = @install_suffix@
|
||||||
|
ifeq (@install_suffix@,)
|
||||||
|
opts =
|
||||||
|
else
|
||||||
|
opts = --suffix=$(suffix)
|
||||||
|
endif
|
||||||
|
|
||||||
|
all:
|
||||||
|
|
||||||
|
check:
|
||||||
|
|
||||||
|
check-installed:
|
||||||
|
@status=0; \
|
||||||
|
$(MAKE) check-installed-vvp || status=1; \
|
||||||
|
$(MAKE) check-installed-vvp-py || status=1; \
|
||||||
|
$(MAKE) check-installed-vpi || status=1; \
|
||||||
|
exit $$status
|
||||||
|
|
||||||
|
check-installed-vpi:
|
||||||
|
@echo "Running vpi_reg.pl"
|
||||||
|
ifeq (@LIBVERIUSER@,yes)
|
||||||
|
cd $(abs_srcdir); perl vpi_reg.pl --with-pli1 $(opts)
|
||||||
|
else
|
||||||
|
cd $(abs_srcdir); perl vpi_reg.pl $(opts)
|
||||||
|
endif
|
||||||
|
|
||||||
|
check-installed-vvp:
|
||||||
|
@echo "Running vvp_reg.pl"
|
||||||
|
cd $(abs_srcdir); perl vvp_reg.pl $(opts)
|
||||||
|
|
||||||
|
check-installed-vvp-py:
|
||||||
|
@echo "Running vvp_reg.py"
|
||||||
|
cd $(abs_srcdir); python3 vvp_reg.py $(opts)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f $(srcdir)/*.vpi
|
||||||
|
rm -rf $(srcdir)/log $(srcdir)/vpi_log $(srcdir)/work
|
||||||
|
|
||||||
|
distclean: clean
|
||||||
|
rm -f Makefile
|
||||||
|
|
||||||
|
install:
|
||||||
|
|
||||||
|
uninstall:
|
||||||
|
|
||||||
|
Makefile: $(srcdir)/Makefile.in ../config.status
|
||||||
|
cd ..; ./config.status --file=ivtest/$@
|
||||||
|
|
||||||
|
.PHONY: check-installed check-installed-vpi check-installed-vvp check-installed-vvp-py
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Copyright (c) 1998-2026 Stephen Williams (steve@icarus.com)
|
||||||
#
|
#
|
||||||
# This source code is free software; you can redistribute it
|
# This source code is free software; you can redistribute it
|
||||||
# and/or modify it in source code form under the terms of the GNU
|
# and/or modify it in source code form under the terms of the GNU
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,5 @@
|
||||||
./ivltests/br1005.v:2: sorry: Queues inside classes are not yet supported.
|
1
|
||||||
./ivltests/br1005.v:15: error: Enable of unknown task ``a.q.push_back''.
|
2
|
||||||
./ivltests/br1005.v:16: error: Enable of unknown task ``a.q.push_back''.
|
3
|
||||||
./ivltests/br1005.v:17: error: Enable of unknown task ``a.q.push_back''.
|
4
|
||||||
./ivltests/br1005.v:18: error: Enable of unknown task ``a.q.push_back''.
|
PASSED
|
||||||
./ivltests/br1005.v:19: sorry: Method name nesting is not supported yet.
|
|
||||||
./ivltests/br1005.v:19: : method path: q.pop_front
|
|
||||||
./ivltests/br1005.v:19: error: Object test.a has no method "q.pop_front(...)".
|
|
||||||
./ivltests/br1005.v:22: sorry: Method name nesting is not supported yet.
|
|
||||||
./ivltests/br1005.v:22: : method path: q.pop_front
|
|
||||||
./ivltests/br1005.v:22: error: Object test.a has no method "q.pop_front(...)".
|
|
||||||
./ivltests/br1005.v:25: sorry: Method name nesting is not supported yet.
|
|
||||||
./ivltests/br1005.v:25: : method path: q.pop_front
|
|
||||||
./ivltests/br1005.v:25: error: Object test.a has no method "q.pop_front(...)".
|
|
||||||
./ivltests/br1005.v:28: sorry: Method name nesting is not supported yet.
|
|
||||||
./ivltests/br1005.v:28: : method path: q.pop_front
|
|
||||||
./ivltests/br1005.v:28: error: Object test.a has no method "q.pop_front(...)".
|
|
||||||
9 error(s) during elaboration.
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
./ivltests/br_gh1175c.v:3: syntax error
|
./ivltests/br_gh1175c.v:3: syntax error
|
||||||
./ivltests/br_gh1175c.v:3: errors in UDP table
|
./ivltests/br_gh1175c.v:3: errors in UDP table
|
||||||
./ivltests/br_gh1175c.v:1: error: Invalid table for UDP primitive id_0.
|
./ivltests/br_gh1175c.v:1: error: Invalid table for UDP primitive id_0.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
./ivltests/br_gh1175d.v:3: syntax error
|
./ivltests/br_gh1175d.v:3: syntax error
|
||||||
./ivltests/br_gh1175d.v:3: errors in UDP table
|
./ivltests/br_gh1175d.v:3: errors in UDP table
|
||||||
./ivltests/br_gh1175d.v:1: error: Invalid table for UDP primitive id_0.
|
./ivltests/br_gh1175d.v:1: error: Invalid table for UDP primitive id_0.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
./ivltests/br_gh1175e.v:3: syntax error
|
./ivltests/br_gh1175e.v:3: syntax error
|
||||||
./ivltests/br_gh1175e.v:3: errors in UDP table
|
./ivltests/br_gh1175e.v:3: errors in UDP table
|
||||||
./ivltests/br_gh1175e.v:1: error: Invalid table for UDP primitive id_0.
|
./ivltests/br_gh1175e.v:1: error: Invalid table for UDP primitive id_0.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
FST info: dumpfile dump.fst opened for output.
|
||||||
|
|
@ -3,4 +3,4 @@
|
||||||
./ivltests/br_gh72b_fail.v:8: error: too few arguments for `macro2
|
./ivltests/br_gh72b_fail.v:8: error: too few arguments for `macro2
|
||||||
./ivltests/br_gh72b_fail.v:9: error: too few arguments for `macro2
|
./ivltests/br_gh72b_fail.v:9: error: too few arguments for `macro2
|
||||||
./ivltests/br_gh72b_fail.v:10: error: too many arguments for `macro2
|
./ivltests/br_gh72b_fail.v:10: error: too many arguments for `macro2
|
||||||
Preprocessor failed with 5 errors.
|
Preprocessor failed with 5 error(s).
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
ivltests/decl_before_use1.v:4: warning: net/variable `v` used before declaration.
|
||||||
|
ivltests/decl_before_use1.v:9: : the net/variable is declared here.
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
1
|
||||||
|
used before declaration
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
ivltests/decl_before_use2.v:3: warning: net/variable `w` used before declaration.
|
||||||
|
ivltests/decl_before_use2.v:10: : the net/variable is declared here.
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
00000001
|
||||||
|
used before declaration
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
ivltests/decl_before_use3.v:4: warning: event `e` used before declaration.
|
||||||
|
ivltests/decl_before_use3.v:8: : the event is declared here.
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
used before declaration
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
used before declaration
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
ivltests/decl_before_use5.v:4: warning: parameter `w` used before declaration.
|
||||||
|
ivltests/decl_before_use5.v:8: : the parameter is declared here.
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
10101010
|
||||||
|
used before declaration
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
10
|
||||||
|
FAILED
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
./ivltests/pr1909940.v:4: warning: net/variable `in` used before declaration.
|
||||||
|
./ivltests/pr1909940.v:5: : the net/variable is declared here.
|
||||||
|
PASSED
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
./ivltests/pr1909940b.v:4: warning: net/variable `in` used before declaration.
|
||||||
|
./ivltests/pr1909940b.v:5: : the net/variable is declared here.
|
||||||
|
PASSED
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
ivltests/sv_interface_port_array_modport_restrict_fail.v:10: error: Cannot assign to input modport member `value' through interface port `bus'.
|
||||||
|
1 error(s) during elaboration.
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
ivltests/sv_interface_port_array_size_mismatch_fail.v:12: error: Interface array port `bus' expects 2 element(s) but actual `buses' has 1 element(s).
|
||||||
|
Elaboration failed
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
ivltests/sv_interface_port_forwarding_restrict_fail.v:23: error: Interface member `hidden' is not listed in modport `consumer'.
|
||||||
|
ivltests/sv_interface_port_forwarding_restrict_fail.v:23: error: Unable to elaborate r-value: bus.hidden
|
||||||
|
2 error(s) during elaboration.
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
ivltests/sv_interface_port_missing_modport_fail.v:18: error: Interface port bus uses unknown modport `consumer' of interface `bus_if'.
|
||||||
|
1 error(s) during elaboration.
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
ivltests/sv_interface_port_missing_type_fail.v:7: error: Interface port bus uses unknown interface type `missing_if'.
|
||||||
|
1 error(s) during elaboration.
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
ivltests/sv_interface_port_modport_input_write_fail.v:21: error: Cannot assign to input modport member `value' through interface port `bus'.
|
||||||
|
1 error(s) during elaboration.
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
ivltests/sv_interface_port_non_interface_actual_fail.v:9: error: Actual for interface port `bus' is not an interface instance.
|
||||||
|
Elaboration failed
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
ivltests/sv_interface_port_positional_unconnected_fail.v:7: error: Interface port `bus' of module bus_user is not connected.
|
||||||
|
Elaboration failed
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
ivltests/sv_interface_port_unlisted_member_fail.v:24: error: Interface member `hidden' is not listed in modport `consumer'.
|
||||||
|
ivltests/sv_interface_port_unlisted_member_fail.v:24: error: Unable to elaborate r-value: bus.hidden
|
||||||
|
2 error(s) during elaboration.
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
ivltests/sv_interface_port_unmodported_missing_type_fail.v:7: error: Interface port bus uses unknown interface type `missing_if'.
|
||||||
|
1 error(s) during elaboration.
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
ivltests/sv_interface_port_wrong_type_fail.v:9: error: Interface port `bus' expects interface type `bus_if' but actual `bus' has type `other_if'.
|
||||||
|
Elaboration failed
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
ivltests/udp_empty_table_fail.v:7: error: Empty UDP table.
|
||||||
|
ivltests/udp_empty_table_fail.v:3: error: Invalid table for UDP primitive udp_empty_table_fail.
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
// Check that real expressions can not be used as array indices.
|
||||||
|
|
||||||
|
module test;
|
||||||
|
|
||||||
|
reg [1:0] a[1:0];
|
||||||
|
real r;
|
||||||
|
|
||||||
|
initial begin
|
||||||
|
a[r] = 2'b10;
|
||||||
|
end
|
||||||
|
|
||||||
|
endmodule
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
// Check that `begin_keywords accepts the 1364-1995 keyword set.
|
||||||
|
|
||||||
|
`begin_keywords "1364-1995"
|
||||||
|
module test;
|
||||||
|
initial begin
|
||||||
|
$display("PASSED");
|
||||||
|
end
|
||||||
|
endmodule
|
||||||
|
`end_keywords
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
// Check that `begin_keywords accepts the 1364-2001 keyword set.
|
||||||
|
|
||||||
|
`begin_keywords "1364-2001"
|
||||||
|
module test;
|
||||||
|
initial begin
|
||||||
|
$display("PASSED");
|
||||||
|
end
|
||||||
|
endmodule
|
||||||
|
`end_keywords
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
// Check that `begin_keywords accepts the 1364-2001-noconfig keyword set.
|
||||||
|
|
||||||
|
`begin_keywords "1364-2001-noconfig"
|
||||||
|
module test;
|
||||||
|
initial begin
|
||||||
|
$display("PASSED");
|
||||||
|
end
|
||||||
|
endmodule
|
||||||
|
`end_keywords
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
// Check that `begin_keywords accepts the 1364-2005 keyword set.
|
||||||
|
|
||||||
|
`begin_keywords "1364-2005"
|
||||||
|
module test;
|
||||||
|
initial begin
|
||||||
|
$display("PASSED");
|
||||||
|
end
|
||||||
|
endmodule
|
||||||
|
`end_keywords
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
// Check that `begin_keywords accepts the 1800-2005 keyword set.
|
||||||
|
|
||||||
|
`begin_keywords "1800-2005"
|
||||||
|
module test;
|
||||||
|
initial begin
|
||||||
|
$display("PASSED");
|
||||||
|
end
|
||||||
|
endmodule
|
||||||
|
`end_keywords
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
// Check that `begin_keywords accepts the 1800-2009 keyword set.
|
||||||
|
|
||||||
|
`begin_keywords "1800-2009"
|
||||||
|
module test;
|
||||||
|
initial begin
|
||||||
|
$display("PASSED");
|
||||||
|
end
|
||||||
|
endmodule
|
||||||
|
`end_keywords
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
// Check that `begin_keywords accepts the 1800-2012 keyword set.
|
||||||
|
|
||||||
|
`begin_keywords "1800-2012"
|
||||||
|
module test;
|
||||||
|
initial begin
|
||||||
|
$display("PASSED");
|
||||||
|
end
|
||||||
|
endmodule
|
||||||
|
`end_keywords
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
// Check that `begin_keywords accepts the 1800-2017 keyword set.
|
||||||
|
|
||||||
|
`begin_keywords "1800-2017"
|
||||||
|
module test;
|
||||||
|
initial begin
|
||||||
|
$display("PASSED");
|
||||||
|
end
|
||||||
|
endmodule
|
||||||
|
`end_keywords
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
// Check that `begin_keywords accepts the 1800-2023 keyword set.
|
||||||
|
|
||||||
|
`begin_keywords "1800-2023"
|
||||||
|
module test;
|
||||||
|
initial begin
|
||||||
|
$display("PASSED");
|
||||||
|
end
|
||||||
|
endmodule
|
||||||
|
`end_keywords
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue