Compare commits

..

7 Commits

Author SHA1 Message Date
David Mak 9b06640dec [artiq] Implement core_log and rtio_log in terms of polymorphic_print
Implementation mostly references the original implementation in Python.
2024-08-13 12:34:43 +08:00
David Mak 0c84ccfa6c [artiq] Add core_log and rtio_log function declarations 2024-08-13 12:34:43 +08:00
David Mak 80488eff72 [core] toplevel/composer: Add lateinit_builtins
This is required for the new core_log and rtio_log functions, which take
a generic type as its parameter. However, in ARTIQ builtins are
initialized using one unifier and then actually used by another unifier.

lateinit_builtins workaround this issue by deferring the initialization
of functions requiring type variables until the actual unifier is ready.
2024-08-13 12:34:43 +08:00
David Mak f4d785a65f [core] codegen: Add function to get format constants for integers 2024-08-13 12:34:43 +08:00
David Mak 3aab6e01bb [core] codegen/expr: Make gen_string return `StructValue`
So that it is clear that the value itself is returned rather than a
pointer to the struct or its data.
2024-08-13 12:34:43 +08:00
David Mak 203ca505ba [core] Add `CodeGenContext::build_in_bounds_gep_and_load`
For safer accesses to `gep`-able values and faster fails.
2024-08-13 12:34:43 +08:00
David Mak 1ccfad9c53 standalone: Fix several issues post script refactoring
- Add helptext for check_demos.sh
- Add back support for using debug NAC3 for running tests
- Output error message when argument is not recognized
- Fixed last non-demo script argument being ignored
- Add back SSE2 requirement to NAC3 (required for mandelbrot)
2024-08-13 12:34:41 +08:00
3 changed files with 7 additions and 2 deletions

View File

@ -8,7 +8,7 @@ if [ -z "$1" ]; then
fi
declare -a nac3args
while [ $# -ge 1 ]; do
while [ $# -gt 1 ]; do
case "$1" in
--help)
echo "Usage: check_demo.sh [--debug] [-i686] -- [NAC3ARGS...] demo"

View File

@ -2,6 +2,11 @@
set -e
if [ "$1" == "--help" ]; then
echo "Usage: check_demos.sh [CHECKARGS...] [--] [NAC3ARGS...]"
exit
fi
count=0
for demo in src/*.py; do
./check_demo.sh "$@" "$demo"

View File

@ -14,7 +14,7 @@ declare -a nac3args
while [ $# -ge 1 ]; do
case "$1" in
--help)
echo "Usage: run_demo.sh [--help] [--out OUTFILE] [--debug] [-i686] -- [NAC3ARGS...]"
echo "Usage: run_demo.sh [--help] [--out OUTFILE] [--debug] [-i686] -- [NAC3ARGS...] demo"
exit
;;
--out)