1
0
mirror of https://github.com/myhdl/myhdl.git synced 2024-12-14 07:44:38 +08:00

2173 Commits

Author SHA1 Message Date
chiplukes
f0da5a6fa2
Fix Icarus cosimulation vpi bug for static signals (#444)
* created a test that shows the cosimulation bug

* fix icarus vpi so that all to_myhdl signals are updated at least once even if they are static
2024-10-05 10:07:42 +02:00
Josy Boelen
75bb3a7598
blocked intialstaion of TristateSignals (#439) 2024-08-07 20:24:32 +02:00
Josy Boelen
e3b4d5263a
_toVerilog.py: 'skip_zero_mem_init': repaired test for 'zero' value :( (#433)
* _toVerilog.py: 'skip_zero_mem_init': repaired test for 'zero' value :(

* incremented subminor version number
2024-06-14 08:39:27 +02:00
Josy Boelen
ac9b87c273
_toVerilog.py: 'skip_zero_mem_init': added *forgotten* condition taht the initail value must be zero to be able to skip the genberation of the initial block (#432) 2024-06-12 10:20:27 +02:00
Josy Boelen
6520f32194
_toVerilog.py: expanding initial_values kwarg to add 'skip_zero_mem_init' choice to skip generating initial block when all values are zero (#431) 2024-06-11 13:48:35 +02:00
Josy Boelen
e356d8a589
Removed support for Python 3.7 (which is End Of Life since 2023-06-27) (#430)
* Removed support for Python 3.7 (which is End Of Life since 2023-06-27)
Removed stray ast.Str and the like , which throw deprecation warnings in Python 3.12

* corrected import pathj for raises_kind

* corrected `ord` value assignemnt in _toVerilog.py
removed forgotten ast.dump call from _analyze.py
2024-06-03 11:57:39 +02:00
Josy Boelen
e95762e4ef
Init list of enums (#428)
* correct initial_values for List Of Signal(enum)

* added dedicated test for ListOfSignal(enum)
2024-02-04 18:40:30 +01:00
Dave Keeshan
9f25c072f4
Change how windows does pip install (#427) 2024-02-04 11:07:01 +01:00
Josy Boelen
a0bebbf72d
corrected .vcd representation for array of enums (#426)
corrected  pck_myhdl_xx version number, removing the subminor index
2024-02-03 13:47:47 +01:00
Josy Boelen
7cef85c1c6
**OpenPort** for unused outputs (#424)
* Added `OpenPort` to emulate VHDL 'open' port

* Of course we need the new module: _openport.py

* refining detection of OpenPrt in _toVerilog.py

* Corrected constant array for Verilog 2005
2023-10-19 20:54:26 +02:00
Josy Boelen
15104a0f8c
**Constant** signals (#423)
* Added `Constant` signal object

* Corrected *_shortversion*
ToDo: replace by single global variable in myhdl/myhdl/__init__.py

* one more *_shortversion* ...
2023-10-19 17:00:26 +02:00
Dave Keeshan
4081474f75
Fix pip install on windows (#422)
* Test

* Move from python -m pip to just pip
2023-10-05 16:41:42 +02:00
Josy Boelen
7e235fc97a
doc: added expalantion of how reset opoerates on ListOfSignals (#417) 2023-04-26 19:07:16 +02:00
Josy Boelen
ef206f072e
Cleaning up tests: (#412)
* Cleaning up tests:
removing wildcard imports
correcting indents
remving as much warnings as possible: mostly unused variables

* TestInferWaiter: correct mismatch in number of arguments

* replacing `for __` inside generator with `for dummy`
cleaning ud 'bugs' section too

* repaired some over-optimistic "Verschlimmbesserungen"

* some more repairs of new *Vershlimwbesserungen* - literally *improvements that make things worse* :)
2023-04-10 14:08:57 +02:00
Josy Boelen
4f8b1df02c
Updating README.md to show alternative solutions to install MyHDL (#415)
* Updating README.md to show  alternative solutions to insatll MyHDL instead of installing from the *lagging* PyPI

* removing *stale* link to Travis CI build status; need to find build status of GitHub Actions?
updating link to Discourse

* getting Discourse image from third-party web-site

* replacing thirdparty Discourse image by original version from Discourse web-site

* trying to make the Discourse a bit smaller

* second try to change the image size

* third try

* reformatting positions of *badges*

* still reformatting ...

* trying harder

* adding empty lines after *badges*

* editing text
2023-04-05 14:31:55 +02:00
Dave Keeshan
5ec3d08d2e
Add windows actions, python3.11 for core and ghdl (#410)
* Add initial actions for winows, include core and ghdl, iverilog is not working yet

* Rename some steps to show linux providence

* Rename some steps to show linux providence
2023-02-08 15:53:35 +01:00
Dave Keeshan
35bd903371
True case statment mapping support (#408)
* Add initial support for match/case in python, only available in 3.10 on

* Fixed testing so that only the match code is used on python 3.10 or above

* Add spport for enumerated types in match statments

* Rewrote the code to leverage the correct AST way of walking the case/match tree to build the correct RTL versions

* Removed enumerate where not used

* Removed enumerate where not used

* Move appropriate code into match_case definition

* Remove unused defs

* Remove unused defs

* Cleanup of redundant code, and replace some simple variable names with more representative names
2023-02-03 18:08:02 +01:00
Dave Keeshan
1dd830fbfc
Constant value inversion (~0x1, ~0x4523) not working in VHDL (#407)
* Add test for the inverting of a constant integer (~0x3, ~0x24 etc), this works in myhdl and verilog but fails in VHDL

* In the cases where the value being inverted is a constant, calculate in the conversion stage the correct inversion value and store that, for a not on a signal name or a boolean there is no change

* Rewrite code so that a not int looks like a not int in the VHDL and not the calculated result

* Ignore the warning as it is a operational message not a testing message

* Change ast.Constant to ast.Num, the latter was only introduced in python3.8, it will be deprecated

* Rewrite code to be python version dependent, ast.Num was removed in favour of ast.Constant in 3.8
2023-02-03 18:00:11 +01:00
Dave Keeshan
0c38f9441b
Binops convert in VHDL fix (#404)
* Add tests that shows failing case, in VHDL. When many unsigned, single bit signals are BinOped together (Or'ed in this case) to a boolean (std_logic). Verilog works

* Remove clk from design where it is not used

* Update tests to find more corner cases

* Add dest to rhs signal to allow the destination signal to be rippled along the chain if there are multiple elements/signals being assigned
2023-01-19 17:42:54 +01:00
Dave Keeshan
7c6a5fda54
Raise traceSignals to DeprecationWarning from UserWarning (#401) 2022-12-24 10:48:13 +01:00
Josy Boelen
da9adf848a
Release 0.11.42 (#400) 2022-12-18 21:17:40 +01:00
Dave Keeshan
3775119f83
Clean PyPi release flow 17/12/2022 (#399)
* Move conditional so the whole job doesn't run unless it is a tag

* Add dist to make and restructure release

* Add message

* Add message

* Add message

* Add message

* Add message

* Add message

* Add message

* Add message

* Add message

* Add README to release to appear on PyPi

* Added read definition
2022-12-18 20:30:27 +01:00
Dave Keeshan
f8022d3dbd
Update makeflow (#396)
* Clean up verify convert warnings

* Rewrote test and remove Xfail, test is passing now (is it supposed to fail?)

* Rewrote test and remove Xfail, test is passing now (is it supposed to fail?)

* Fixed all tests to handle the analyze/verify deprecation

* Fixed to catch the correct error, List of signals as a port is not supported

* Add a way to search for and add myhdl.vpi

* Add explict test to check for deprecation case

* Change warning from UserWarning (which is the default) to DeprecationWarning

* Change test operation from script to makefile

* No longer use travis

* Add some ANSI colored logging

* Fixed test to look for DeprecationWarning

* Add lining step

* Add linting step

* Add linting step

* Remove matrix step

* Add work/ to clean list

* Hide echo commands in window

* The word test is reserved in pytest only for tests, doen't use it for any thing else, like blocks

* Add myhdl.vpi to clean

* Mark these tests as xfail, for now,

* Fix and unmark xfail 2 tests

* Add black support

* Remove python2 only testing

* Need to relook at this test, it performs differently for verilog and vhdl

* Add RTL files to the list

* Need to relook at this test, it performs differently for verilog and vhdl

* Upgrade to DeprecationWarnings

* Initial checkin with passing flow for new convert VHDL/Verilog, there are a few xfail tests that need to be debugged

* Add more examples for the Deprecation cases, toVHDL and toVerilog

* Fix deprecations catching

* Fix pytest to use pytest.ini

* Add pypi release steps

* Fix intbv error

* Fix indent

* Update to do a release

* Add checkout to step

* Update Python versions

* Add dependancy on tag on push
2022-12-17 13:21:08 +01:00
Dave Keeshan
b85c1668c1
Update flow to compile and used cached version of tools (#387) 2022-12-07 14:41:25 +01:00
Keerthan Jaic
d9054d3cb4
Merge pull request #383 from jtremesay/patch-1
Fix a typo in an error message - integeer -> integer
2022-11-16 05:23:28 +00:00
Jonathan Tremesaygues
504f46a7dd
Fix a typo in an error message
integeer -> integer
2022-11-15 20:22:26 +01:00
Keerthan Jaic
32c9c7abc1
add python 3.11 to ci matrix (#382) 2022-11-04 20:39:58 +01:00
Josy Boelen
279941b8b8
Added missing visit_NameConnstant() for Python versions 3.7 adn 3.8 (#380)
Modified test
2022-10-10 20:12:02 +02:00
Josy Boelen
79cf2218f4
Removed testing with Python 3.6 - EOL <> Added testing with PyPy 3.9 (#376)
* Removed testing with Python 3.6 - EOL
Added testing with PyPy 3.9

* corrected to 'pypy-3.9'
2022-08-02 17:40:09 +02:00
Josy Boelen
e6ac73214e
Conversion with recursive ShadowSignals (#359)
* _ShadowSignal.py: conversion:
  enabled taking a ShadowSignal of a ShadowSignal,
  reworked _setName() to aggregate chained slicing/indexing to a single slice or index
  marked the shadowed Signal as  always 'read'
_intbv.py: added the [n:] to __repr__
_toVHDL.py: added a comment

* added test for recursive/chained ShadowSignals

* added missing returned instance

* wrong startvalue

* Changed a docstring to launch GitHub actions on origin
2022-08-01 18:57:07 +02:00
tobygomersall
0477c7e042
[ENH] Updated the ConcatSignal conversion code to check for undriven … (#371)
* [ENH] Updated the ConcatSignal conversion code to check for undriven signals.

* [ENH] Added a test to check the undriven ConcatSignal converts sensibly.
2022-07-04 19:10:21 +02:00
Josy Boelen
ae25af4d59
Removed 'casez' in Verilog onehot / onecold state encoding (#357)
* Removed 'casez' in Verilog onehot / onecold state encoding
2022-05-24 08:21:46 +02:00
Josy Boelen
212b4b294e
removed error on reading back outputs of always_comb process (#368)
* removed error on reading back outputs of `always_comb` process

* Update _always_comb.py

* removed tests for SignalAsInout in AlwaysComb
2022-04-26 22:06:04 +02:00
Rafael Corsi
0247603e82
fix typo on structure doc (#365) 2022-04-26 17:51:15 +02:00
Rafael Corsi
cf8e4423a7
update mux2 example to python3 (print) (#363) 2022-04-26 17:50:38 +02:00
Dave Keeshan
1a4f5cd4e9
Setup github actions (#369)
* First working yml for github actions

* Remove redundant lines

* Test with building ghdl from source

* Re-enable all versions of python

* Re-enable all versions of python

* python-3.11 not available yet

* Add weekly cron on Sunday

Co-authored-by: Douglas Kastle <douglas.kastle@gmail.com>
2022-04-26 17:04:19 +02:00
Josy Boelen
cd869c149c #366 documenting _config-sim_ *tracebackup* attribute 2022-04-02 15:37:07 +02:00
Josy Boelen
c7662a056c
No more name mangling (#336)
* palce xfail on rename_after ... test

* Adding a commmnet to force commit

* alternate approach in testOBufInterface

* reverting _analyze.py
reaming the simulation objects

* typos

* final commit to 'finish' PR submission

* And of course I forgot the 'xfail'

* cleaning up wild import in test_tristate.py to provoke another Travis/CI run

* There is something wrong with the 'xfail' so I just commented out the offender

* uncommented the second test in test_tristate.py

* Changed the object names in the testbench, hoping to narrow down where it fails

* Changing more object names

* myhdl.c: added #ifdef _WIN32 clause to get the pipes working in WIndows 10, properly (auto-)formatted the source
util.py: changed the myhdl.vpi path to defaukt to iverilog's known system path
test_tristate.py: the TestTristate class re-used the tristate_obuf.o for the test with the interface; which put iverilog on the wrong foot ...

* util.py: make a distinction between Windows and Linux systems where to get myhdl.vpi
2022-03-10 13:59:43 +01:00
Keerthan Jaic
7b17942abb
Merge pull request #358 from josyb/Python3_9
Fixing issue #350
2021-03-18 22:35:03 +00:00
Keerthan Jaic
35d684ced2
Merge pull request #355 from hellow554/patch-3
replace yield_fixture decorator by fixture
2021-03-13 03:07:25 +00:00
Josy Boelen
55e7113311 cleared out remaining debug-print 2021-03-08 09:55:28 +01:00
Josy Boelen
65c456b680 Finally? 2021-03-07 14:13:30 +01:00
Josy Boelen
d01c4ee31b improving ast.Constant 2021-03-07 13:48:46 +01:00
Josy Boelen
19066e0656 restricted debugging to 3.9 only 2021-03-07 11:06:26 +01:00
Josy Boelen
48f7a5897c 3.9 serves a tuple 2021-03-07 10:53:12 +01:00
Josy Boelen
55e823e939 next re-write 2021-03-06 20:34:11 +01:00
Josy Boelen
fddbd06595 Merge branch 'Python3_9' of https://github.com/josyb/myhdl into Python3_9 2021-03-06 20:11:17 +01:00
Josy Boelen
989be768a4 and continuing 2021-03-06 20:07:55 +01:00
Josy Boelen
493a7e90d8 not giving up 2021-03-06 20:07:20 +01:00
Josy Boelen
97c9ed3d3b not giving up 2021-03-06 19:49:49 +01:00