├── .gitattributes ├── .github └── workflows │ └── github-actions-embed-code.yml ├── .gitignore ├── .gitmodules ├── CMakeLists.txt ├── ChangeLog.md ├── GetStarted.md ├── GetStarted_Linux.md ├── GetStarted_Windows.md ├── GetStarted_macOS.md ├── LICENSE.md ├── LICENSE_GPLv3 ├── LICENSE_MIT ├── README.md ├── antlr ├── antlr-4.7.2-complete.jar ├── antlr.bat ├── antlr.sh ├── antlr4-cpp-runtime-4.7.2-source │ ├── CMakeLists.txt │ ├── LICENSE.txt │ ├── README.md │ ├── VERSION │ ├── cmake │ │ ├── Antlr4Package.md │ │ ├── ExternalAntlr4Cpp.cmake │ │ ├── FindANTLR.cmake │ │ ├── README.md │ │ ├── antlr4-generator.cmake.in │ │ └── antlr4-runtime.cmake.in │ ├── deploy-macos.sh │ ├── deploy-source.sh │ ├── deploy-windows.cmd │ └── runtime │ │ ├── CMakeLists.txt │ │ └── src │ │ ├── ANTLRErrorListener.cpp │ │ ├── ANTLRErrorListener.h │ │ ├── ANTLRErrorStrategy.cpp │ │ ├── ANTLRErrorStrategy.h │ │ ├── ANTLRFileStream.cpp │ │ ├── ANTLRFileStream.h │ │ ├── ANTLRInputStream.cpp │ │ ├── ANTLRInputStream.h │ │ ├── BailErrorStrategy.cpp │ │ ├── BailErrorStrategy.h │ │ ├── BaseErrorListener.cpp │ │ ├── BaseErrorListener.h │ │ ├── BufferedTokenStream.cpp │ │ ├── BufferedTokenStream.h │ │ ├── CharStream.cpp │ │ ├── CharStream.h │ │ ├── CommonToken.cpp │ │ ├── CommonToken.h │ │ ├── CommonTokenFactory.cpp │ │ ├── CommonTokenFactory.h │ │ ├── CommonTokenStream.cpp │ │ ├── CommonTokenStream.h │ │ ├── ConsoleErrorListener.cpp │ │ ├── ConsoleErrorListener.h │ │ ├── DefaultErrorStrategy.cpp │ │ ├── DefaultErrorStrategy.h │ │ ├── DiagnosticErrorListener.cpp │ │ ├── DiagnosticErrorListener.h │ │ ├── Exceptions.cpp │ │ ├── Exceptions.h │ │ ├── FailedPredicateException.cpp │ │ ├── FailedPredicateException.h │ │ ├── InputMismatchException.cpp │ │ ├── InputMismatchException.h │ │ ├── IntStream.cpp │ │ ├── IntStream.h │ │ ├── InterpreterRuleContext.cpp │ │ ├── InterpreterRuleContext.h │ │ ├── Lexer.cpp │ │ ├── Lexer.h │ │ ├── LexerInterpreter.cpp │ │ ├── LexerInterpreter.h │ │ ├── LexerNoViableAltException.cpp │ │ ├── LexerNoViableAltException.h │ │ ├── ListTokenSource.cpp │ │ ├── ListTokenSource.h │ │ ├── NoViableAltException.cpp │ │ ├── NoViableAltException.h │ │ ├── Parser.cpp │ │ ├── Parser.h │ │ ├── ParserInterpreter.cpp │ │ ├── ParserInterpreter.h │ │ ├── ParserRuleContext.cpp │ │ ├── ParserRuleContext.h │ │ ├── ProxyErrorListener.cpp │ │ ├── ProxyErrorListener.h │ │ ├── RecognitionException.cpp │ │ ├── RecognitionException.h │ │ ├── Recognizer.cpp │ │ ├── Recognizer.h │ │ ├── RuleContext.cpp │ │ ├── RuleContext.h │ │ ├── RuleContextWithAltNum.cpp │ │ ├── RuleContextWithAltNum.h │ │ ├── RuntimeMetaData.cpp │ │ ├── RuntimeMetaData.h │ │ ├── Token.cpp │ │ ├── Token.h │ │ ├── TokenFactory.h │ │ ├── TokenSource.cpp │ │ ├── TokenSource.h │ │ ├── TokenStream.cpp │ │ ├── TokenStream.h │ │ ├── TokenStreamRewriter.cpp │ │ ├── TokenStreamRewriter.h │ │ ├── UnbufferedCharStream.cpp │ │ ├── UnbufferedCharStream.h │ │ ├── UnbufferedTokenStream.cpp │ │ ├── UnbufferedTokenStream.h │ │ ├── Vocabulary.cpp │ │ ├── Vocabulary.h │ │ ├── WritableToken.cpp │ │ ├── WritableToken.h │ │ ├── antlr4-common.h │ │ ├── antlr4-runtime.h │ │ ├── atn │ │ ├── ATN.cpp │ │ ├── ATN.h │ │ ├── ATNConfig.cpp │ │ ├── ATNConfig.h │ │ ├── ATNConfigSet.cpp │ │ ├── ATNConfigSet.h │ │ ├── ATNDeserializationOptions.cpp │ │ ├── ATNDeserializationOptions.h │ │ ├── ATNDeserializer.cpp │ │ ├── ATNDeserializer.h │ │ ├── ATNSerializer.cpp │ │ ├── ATNSerializer.h │ │ ├── ATNSimulator.cpp │ │ ├── ATNSimulator.h │ │ ├── ATNState.cpp │ │ ├── ATNState.h │ │ ├── ATNType.h │ │ ├── AbstractPredicateTransition.cpp │ │ ├── AbstractPredicateTransition.h │ │ ├── ActionTransition.cpp │ │ ├── ActionTransition.h │ │ ├── AmbiguityInfo.cpp │ │ ├── AmbiguityInfo.h │ │ ├── ArrayPredictionContext.cpp │ │ ├── ArrayPredictionContext.h │ │ ├── AtomTransition.cpp │ │ ├── AtomTransition.h │ │ ├── BasicBlockStartState.cpp │ │ ├── BasicBlockStartState.h │ │ ├── BasicState.cpp │ │ ├── BasicState.h │ │ ├── BlockEndState.cpp │ │ ├── BlockEndState.h │ │ ├── BlockStartState.cpp │ │ ├── BlockStartState.h │ │ ├── ContextSensitivityInfo.cpp │ │ ├── ContextSensitivityInfo.h │ │ ├── DecisionEventInfo.cpp │ │ ├── DecisionEventInfo.h │ │ ├── DecisionInfo.cpp │ │ ├── DecisionInfo.h │ │ ├── DecisionState.cpp │ │ ├── DecisionState.h │ │ ├── EmptyPredictionContext.cpp │ │ ├── EmptyPredictionContext.h │ │ ├── EpsilonTransition.cpp │ │ ├── EpsilonTransition.h │ │ ├── ErrorInfo.cpp │ │ ├── ErrorInfo.h │ │ ├── LL1Analyzer.cpp │ │ ├── LL1Analyzer.h │ │ ├── LexerATNConfig.cpp │ │ ├── LexerATNConfig.h │ │ ├── LexerATNSimulator.cpp │ │ ├── LexerATNSimulator.h │ │ ├── LexerAction.cpp │ │ ├── LexerAction.h │ │ ├── LexerActionExecutor.cpp │ │ ├── LexerActionExecutor.h │ │ ├── LexerActionType.h │ │ ├── LexerChannelAction.cpp │ │ ├── LexerChannelAction.h │ │ ├── LexerCustomAction.cpp │ │ ├── LexerCustomAction.h │ │ ├── LexerIndexedCustomAction.cpp │ │ ├── LexerIndexedCustomAction.h │ │ ├── LexerModeAction.cpp │ │ ├── LexerModeAction.h │ │ ├── LexerMoreAction.cpp │ │ ├── LexerMoreAction.h │ │ ├── LexerPopModeAction.cpp │ │ ├── LexerPopModeAction.h │ │ ├── LexerPushModeAction.cpp │ │ ├── LexerPushModeAction.h │ │ ├── LexerSkipAction.cpp │ │ ├── LexerSkipAction.h │ │ ├── LexerTypeAction.cpp │ │ ├── LexerTypeAction.h │ │ ├── LookaheadEventInfo.cpp │ │ ├── LookaheadEventInfo.h │ │ ├── LoopEndState.cpp │ │ ├── LoopEndState.h │ │ ├── Makefile │ │ ├── NotSetTransition.cpp │ │ ├── NotSetTransition.h │ │ ├── OrderedATNConfigSet.cpp │ │ ├── OrderedATNConfigSet.h │ │ ├── ParseInfo.cpp │ │ ├── ParseInfo.h │ │ ├── ParserATNSimulator.cpp │ │ ├── ParserATNSimulator.h │ │ ├── PlusBlockStartState.cpp │ │ ├── PlusBlockStartState.h │ │ ├── PlusLoopbackState.cpp │ │ ├── PlusLoopbackState.h │ │ ├── PrecedencePredicateTransition.cpp │ │ ├── PrecedencePredicateTransition.h │ │ ├── PredicateEvalInfo.cpp │ │ ├── PredicateEvalInfo.h │ │ ├── PredicateTransition.cpp │ │ ├── PredicateTransition.h │ │ ├── PredictionContext.cpp │ │ ├── PredictionContext.h │ │ ├── PredictionMode.cpp │ │ ├── PredictionMode.h │ │ ├── ProfilingATNSimulator.cpp │ │ ├── ProfilingATNSimulator.h │ │ ├── RangeTransition.cpp │ │ ├── RangeTransition.h │ │ ├── RuleStartState.cpp │ │ ├── RuleStartState.h │ │ ├── RuleStopState.cpp │ │ ├── RuleStopState.h │ │ ├── RuleTransition.cpp │ │ ├── RuleTransition.h │ │ ├── SemanticContext.cpp │ │ ├── SemanticContext.h │ │ ├── SetTransition.cpp │ │ ├── SetTransition.h │ │ ├── SingletonPredictionContext.cpp │ │ ├── SingletonPredictionContext.h │ │ ├── StarBlockStartState.cpp │ │ ├── StarBlockStartState.h │ │ ├── StarLoopEntryState.cpp │ │ ├── StarLoopEntryState.h │ │ ├── StarLoopbackState.cpp │ │ ├── StarLoopbackState.h │ │ ├── TokensStartState.cpp │ │ ├── TokensStartState.h │ │ ├── Transition.cpp │ │ ├── Transition.h │ │ ├── WildcardTransition.cpp │ │ └── WildcardTransition.h │ │ ├── dfa │ │ ├── DFA.cpp │ │ ├── DFA.h │ │ ├── DFASerializer.cpp │ │ ├── DFASerializer.h │ │ ├── DFAState.cpp │ │ ├── DFAState.h │ │ ├── LexerDFASerializer.cpp │ │ └── LexerDFASerializer.h │ │ ├── misc │ │ ├── InterpreterDataReader.cpp │ │ ├── InterpreterDataReader.h │ │ ├── Interval.cpp │ │ ├── Interval.h │ │ ├── IntervalSet.cpp │ │ ├── IntervalSet.h │ │ ├── MurmurHash.cpp │ │ ├── MurmurHash.h │ │ ├── Predicate.cpp │ │ └── Predicate.h │ │ ├── support │ │ ├── Any.cpp │ │ ├── Any.h │ │ ├── Arrays.cpp │ │ ├── Arrays.h │ │ ├── BitSet.h │ │ ├── CPPUtils.cpp │ │ ├── CPPUtils.h │ │ ├── Declarations.h │ │ ├── StringUtils.cpp │ │ ├── StringUtils.h │ │ ├── guid.cpp │ │ └── guid.h │ │ └── tree │ │ ├── AbstractParseTreeVisitor.h │ │ ├── ErrorNode.cpp │ │ ├── ErrorNode.h │ │ ├── ErrorNodeImpl.cpp │ │ ├── ErrorNodeImpl.h │ │ ├── IterativeParseTreeWalker.cpp │ │ ├── IterativeParseTreeWalker.h │ │ ├── ParseTree.cpp │ │ ├── ParseTree.h │ │ ├── ParseTreeListener.cpp │ │ ├── ParseTreeListener.h │ │ ├── ParseTreeProperty.h │ │ ├── ParseTreeVisitor.cpp │ │ ├── ParseTreeVisitor.h │ │ ├── ParseTreeWalker.cpp │ │ ├── ParseTreeWalker.h │ │ ├── TerminalNode.cpp │ │ ├── TerminalNode.h │ │ ├── TerminalNodeImpl.cpp │ │ ├── TerminalNodeImpl.h │ │ ├── Trees.cpp │ │ ├── Trees.h │ │ ├── pattern │ │ ├── Chunk.cpp │ │ ├── Chunk.h │ │ ├── ParseTreeMatch.cpp │ │ ├── ParseTreeMatch.h │ │ ├── ParseTreePattern.cpp │ │ ├── ParseTreePattern.h │ │ ├── ParseTreePatternMatcher.cpp │ │ ├── ParseTreePatternMatcher.h │ │ ├── RuleTagToken.cpp │ │ ├── RuleTagToken.h │ │ ├── TagChunk.cpp │ │ ├── TagChunk.h │ │ ├── TextChunk.cpp │ │ ├── TextChunk.h │ │ ├── TokenTagToken.cpp │ │ └── TokenTagToken.h │ │ └── xpath │ │ ├── XPath.cpp │ │ ├── XPath.h │ │ ├── XPathElement.cpp │ │ ├── XPathElement.h │ │ ├── XPathLexer.cpp │ │ ├── XPathLexer.g4 │ │ ├── XPathLexer.h │ │ ├── XPathLexer.tokens │ │ ├── XPathLexerErrorListener.cpp │ │ ├── XPathLexerErrorListener.h │ │ ├── XPathRuleAnywhereElement.cpp │ │ ├── XPathRuleAnywhereElement.h │ │ ├── XPathRuleElement.cpp │ │ ├── XPathRuleElement.h │ │ ├── XPathTokenAnywhereElement.cpp │ │ ├── XPathTokenAnywhereElement.h │ │ ├── XPathTokenElement.cpp │ │ ├── XPathTokenElement.h │ │ ├── XPathWildcardAnywhereElement.cpp │ │ ├── XPathWildcardAnywhereElement.h │ │ ├── XPathWildcardElement.cpp │ │ └── XPathWildcardElement.h ├── compile.bat ├── compile.sh ├── grun.bat ├── grun.sh ├── jvc.bat ├── jvc.sh ├── silice.g4 ├── test1.si ├── test1.v ├── testi.bat ├── testl.bat ├── testv.bat └── vmodule.g4 ├── bin ├── .gitignore ├── report-cycles.py └── silice-make.py ├── compile_silice_linux.sh ├── compile_silice_mingw64.sh ├── frameworks ├── boards │ ├── README.md │ ├── TROUBLESHOOTING.md │ ├── bare │ │ ├── bare.sh │ │ ├── bare.v │ │ └── board.json │ ├── boards.json │ ├── brot │ │ ├── board.json │ │ ├── brot.pcf │ │ └── brot.v │ ├── colorlight │ │ ├── board.json │ │ ├── colorlight.v │ │ └── colorlight_i9_v7.2.lpf │ ├── crosslink_nx_evn │ │ ├── board.json │ │ ├── crosslink_nx_evn.pdc │ │ ├── crosslink_nx_evn.sh │ │ └── crosslink_nx_evn.v │ ├── de10nano │ │ ├── board.json │ │ ├── build.sdc │ │ ├── de10nano.v │ │ └── pins.tcl │ ├── de2 │ │ ├── board.json │ │ ├── de2.v │ │ └── pins.tcl │ ├── ecpix5 │ │ ├── board.json │ │ ├── ecpix5.lpf │ │ └── ecpix5.v │ ├── fomu │ │ ├── board.json │ │ ├── fomu-hacker.pcf │ │ ├── fomu-hacker.sh │ │ ├── fomu-pvt1.pcf │ │ ├── fomu-pvt1.sh │ │ └── fomu.v │ ├── formal │ │ ├── board.json │ │ ├── formal.sh │ │ └── formal.v │ ├── icarus │ │ ├── board.json │ │ ├── icarus.sh │ │ └── icarus.v │ ├── icebitsy │ │ ├── board.json │ │ ├── icebitsy.pcf │ │ └── icebitsy.v │ ├── icebreaker │ │ ├── board.json │ │ ├── icebreaker.pcf │ │ ├── icebreaker.sh │ │ └── icebreaker.v │ ├── icestick │ │ ├── board.json │ │ ├── icestick.pcf │ │ ├── icestick.sh │ │ └── icestick.v │ ├── littlebee │ │ ├── board.json │ │ ├── littlebee.cst │ │ ├── littlebee.sh │ │ └── littlebee.v │ ├── mch2022 │ │ ├── board.json │ │ ├── mch2022.pcf │ │ ├── mch2022.sh │ │ └── mch2022.v │ ├── minimal │ │ ├── board.json │ │ ├── minimal.sh │ │ └── minimal.v │ ├── mojov3 │ │ ├── board.json │ │ ├── mojov3.ucf │ │ └── mojov3.v │ ├── orangecrab │ │ ├── board.json │ │ ├── orangecrab.sh │ │ ├── orangecrab.v │ │ └── pinout.lpf │ ├── riegel │ │ ├── board.json │ │ ├── riegel.pcf │ │ └── riegel.v │ ├── techgraph │ │ ├── board.json │ │ ├── techgraph.sh │ │ └── techgraph.v │ ├── ulx3s │ │ ├── board.json │ │ ├── ulx3s.lpf │ │ ├── ulx3s.sh │ │ └── ulx3s.v │ ├── ulx4m_ls │ │ ├── board.json │ │ ├── ulx4m_ls.lpf │ │ ├── ulx4m_ls.sh │ │ └── ulx4m_ls.v │ └── verilator │ │ ├── board.json │ │ ├── verilator.sh │ │ └── verilator.v ├── libraries │ ├── memory_ports.si │ └── riscv │ │ ├── ice-v-dual │ │ ├── config_c.ld │ │ ├── crt0.s │ │ ├── header.h │ │ └── riscv-soc.si │ │ ├── ice-v │ │ ├── config_c.ld │ │ ├── crt0.s │ │ ├── header.h │ │ └── riscv-soc.si │ │ └── riscv-compile.lua ├── templates │ ├── bram_generic.v.in │ ├── bram_wmask_byte.v.in │ ├── brom_generic.v.in │ ├── dualport_bram_altera.v.in │ ├── dualport_bram_generic.v.in │ ├── dualport_bram_wmask_byte.v.in │ ├── simple_dualport_bram_generic.v.in │ ├── simple_dualport_bram_generic_rw.v.in │ ├── simple_dualport_bram_wmask_byte.v.in │ └── simple_dualport_bram_wmask_half_bytes.v.in └── verilator │ ├── ParallelScreen.cpp │ ├── ParallelScreen.h │ ├── README.md │ ├── SPIScreen.cpp │ ├── SPIScreen.h │ ├── VgaChip.cpp │ ├── VgaChip.h │ ├── display.cpp │ ├── display.h │ ├── flyover_simul.gif │ ├── sdr_sdram.cpp │ ├── sdr_sdram.h │ ├── verilator_callbacks.h │ ├── verilator_data.cpp │ └── verilator_main.cpp ├── get_started_linux.sh ├── get_started_mingw64.sh ├── install_dependencies_archlinux.sh ├── install_dependencies_debian_like.sh ├── install_dependencies_fedora.sh ├── learn-silice ├── Advanced.md ├── AlgoInOuts.md ├── Documentation.md ├── ExprBitWidth.md ├── Guidelines.md ├── README.md ├── blinky │ ├── Makefile │ ├── README.md │ ├── blinky0.si │ ├── blinky1.si │ ├── blinky2.si │ ├── blinky3.si │ ├── blinky4.si │ └── blinky5.si ├── classroom │ ├── soc_wave_player │ │ ├── Makefile │ │ ├── README.md │ │ ├── board_pins.jpg │ │ ├── compile │ │ │ └── build │ │ │ │ └── .gitignore │ │ ├── data │ │ │ └── img.raw │ │ ├── encode_music.sh │ │ ├── firmware │ │ │ ├── .gitignore │ │ │ ├── Makefile │ │ │ ├── config.c │ │ │ ├── config.h │ │ │ ├── config_c.ld │ │ │ ├── crt0.s │ │ │ ├── display.c │ │ │ ├── display.h │ │ │ ├── div.s │ │ │ ├── fat_io_lib.c │ │ │ ├── mul.c │ │ │ ├── oled.c │ │ │ ├── oled.h │ │ │ ├── printf.c │ │ │ ├── printf.h │ │ │ ├── sdcard.c │ │ │ ├── sdcard.h │ │ │ ├── std.c │ │ │ ├── std.h │ │ │ ├── step0_leds.c │ │ │ ├── step1_audio_cpu.c │ │ │ ├── step2_hello_world.c │ │ │ ├── step2_show_image.c │ │ │ ├── step3_menu.c │ │ │ ├── step4_list_files.c │ │ │ ├── step5_audio_stream.c │ │ │ ├── step7_hrdw_screen.c │ │ │ ├── tama_mini02_font.h │ │ │ ├── test_audio_stream_cpu.c │ │ │ ├── test_audio_write.c │ │ │ ├── test_fat32.c │ │ │ ├── test_img_sectors.c │ │ │ ├── test_sdcard.c │ │ │ └── test_sdcard_cb.c │ │ ├── hardware │ │ │ └── main.si │ │ ├── pre_include_compiled.lua │ │ ├── screen_pins.jpg │ │ └── setup.jpg │ └── tools │ │ └── solutions.py ├── figures │ ├── bind_a.png │ ├── bind_b.png │ ├── bind_c.png │ ├── bind_d.png │ ├── bind_timings.png │ ├── bind_timings.pptx │ ├── blinky5.gif │ ├── first_example.gif │ ├── gates.png │ ├── gtkwave1.jpg │ ├── mingw64_prompt.png │ ├── t10.gif │ └── vga_demo_frame.png ├── formal │ ├── Makefile │ ├── README.md │ ├── bmc.png │ ├── divint_verif.si │ ├── false-positive.si │ ├── mulint_verif.si │ ├── tind.png │ ├── tutorial-results-2.png │ ├── tutorial-results.png │ ├── tutorial-trace.png │ └── tutorial.si └── tutorial │ ├── Makefile │ ├── t1.si │ ├── t10.si │ ├── t11.si │ ├── t12.si │ ├── t13.si │ ├── t14.si │ ├── t2.si │ ├── t3.si │ ├── t4.si │ ├── t5.si │ ├── t6.si │ ├── t7.si │ ├── t8.si │ ├── t9.si │ └── t9_2.si ├── projects ├── DIYVGA.md ├── README.md ├── audio_sdcard_streamer │ ├── .gitignore │ ├── Makefile │ ├── README.md │ ├── configs │ └── main.si ├── blinky │ ├── Makefile │ ├── README.md │ ├── blinky.si │ └── configs ├── bram_interface │ ├── Makefile │ ├── configs │ └── main.si ├── bram_wmask │ ├── Makefile │ ├── configs │ └── main.si ├── buttons_and_leds │ ├── Makefile │ ├── buttons_and_leds.si │ └── configs ├── common │ ├── audio_pwm.si │ ├── clean_reset.si │ ├── ddr.v │ ├── ddr_clock.v │ ├── divint.si │ ├── divint16.si │ ├── divint_any.si │ ├── divint_std.si │ ├── divint_std_auto.si │ ├── docs │ │ └── float16 float32.pdf │ ├── dual_frame_buffer_row.v │ ├── ecp5_inout.v │ ├── ecp5_out.v │ ├── empty.si │ ├── float16.si │ ├── float32.si │ ├── font.si │ ├── font_small.si │ ├── hdmi.si │ ├── hdmi_clock.v │ ├── hdmi_ddr_crgb.v │ ├── ice40_half_clock.v │ ├── ice40_half_quarter_clock.v │ ├── ice40_sb_gb.v │ ├── ice40_sb_io.v │ ├── ice40_sb_io_ddr.v │ ├── ice40_sb_io_in_ddr.v │ ├── ice40_sb_io_in_ddr_8.v │ ├── ice40_sb_io_inout.v │ ├── ice40_spram.v │ ├── ice40_warmboot.v │ ├── inout16_ff_ulx3s.v │ ├── inout16_set.v │ ├── inout1_set.v │ ├── inout4_set.v │ ├── inout8_set.v │ ├── keypad.si │ ├── lcd.si │ ├── mt48lc16m16a2.v │ ├── mt48lc32m8a2.v │ ├── mulint.si │ ├── mulint_any.si │ ├── mulint_pipe.si │ ├── mulint_pipe_any.si │ ├── oled.si │ ├── oled_ssd1331.si │ ├── oled_ssd1351.si │ ├── oled_st7789.si │ ├── out13_ff_ulx3s.v │ ├── out1_ff_ulx3s.v │ ├── out2_ff_ulx3s.v │ ├── passthrough.v │ ├── plls │ │ ├── brot_100_lock.v │ │ ├── brot_25_lock.v │ │ ├── brot_50_lock.v │ │ ├── crosslink_nx_evn_25.v │ │ ├── de10nano_100_25.v │ │ ├── de10nano_100_25_100ph180.v │ │ ├── de10nano_133.v │ │ ├── de10nano_173.v │ │ ├── de10nano_25.v │ │ ├── de10nano_50_25_100.v │ │ ├── de10nano_50_25_100_100ph180.v │ │ ├── de2_25_100_100ph180.v │ │ ├── ecpix5_100_25.v │ │ ├── ecpix5_133.v │ │ ├── ecpix5_173.v │ │ ├── ecpix5_25.v │ │ ├── ecpix5_36.v │ │ ├── ecpix5_40.v │ │ ├── ecpix5_50.v │ │ ├── ecpix5_50_25_100_100ph180.v │ │ ├── ecpix5_65.v │ │ ├── fomu_16.v │ │ ├── fomu_20.v │ │ ├── fomu_25.v │ │ ├── fomu_50.v │ │ ├── fomu_55.v │ │ ├── icebrkr_100.v │ │ ├── icebrkr_15.v │ │ ├── icebrkr_20.v │ │ ├── icebrkr_20_lock.v │ │ ├── icebrkr_23.v │ │ ├── icebrkr_24.v │ │ ├── icebrkr_25.v │ │ ├── icebrkr_25_lock.v │ │ ├── icebrkr_26.v │ │ ├── icebrkr_30.v │ │ ├── icebrkr_50.v │ │ ├── icebrkr_50_lock.v │ │ ├── icebrkr_60.v │ │ ├── icebrkr_60_lock.v │ │ ├── icebrkr_66.v │ │ ├── icebrkr_66_lock.v │ │ ├── icebrkr_70.v │ │ ├── icebrkr_75.v │ │ ├── icebrkr_80.v │ │ ├── icestick_100.v │ │ ├── icestick_120.v │ │ ├── icestick_120_lock.v │ │ ├── icestick_140.v │ │ ├── icestick_25.v │ │ ├── icestick_50.v │ │ ├── icestick_50_lock.v │ │ ├── icestick_60.v │ │ ├── icestick_60_lock.v │ │ ├── icestick_65.v │ │ ├── icestick_70.v │ │ ├── icestick_80.v │ │ ├── icestick_90.v │ │ ├── mojo_100_25.v │ │ ├── mojo_100_75.v │ │ ├── mojo_50_25.v │ │ ├── mojo_50_25_125.v │ │ ├── mojo_50_25_125_125n.v │ │ ├── mojo_75_25.v │ │ ├── orangecrab_100.v │ │ ├── orangecrab_125.v │ │ ├── orangecrab_150.v │ │ ├── orangecrab_70.v │ │ ├── riegel_102.v │ │ ├── riegel_108.v │ │ ├── riegel_25.v │ │ ├── simul_166.v │ │ ├── simul_200.v │ │ ├── ulx3s_100.v │ │ ├── ulx3s_100_100_p180.v │ │ ├── ulx3s_100_25.v │ │ ├── ulx3s_120.v │ │ ├── ulx3s_125_25.v │ │ ├── ulx3s_150.v │ │ ├── ulx3s_150_25.v │ │ ├── ulx3s_160_25_160_160ph60.v │ │ ├── ulx3s_160_25_160_160ph90.v │ │ ├── ulx3s_166_25.v │ │ ├── ulx3s_175.v │ │ ├── ulx3s_200.v │ │ ├── ulx3s_200_25.v │ │ ├── ulx3s_200_25_100_100ph180.v │ │ ├── ulx3s_210.v │ │ ├── ulx3s_215.v │ │ ├── ulx3s_220.v │ │ ├── ulx3s_250_125_25.v │ │ ├── ulx3s_250_25.v │ │ ├── ulx3s_25_25.v │ │ ├── ulx3s_25_25_100.v │ │ ├── ulx3s_25_25_50.v │ │ ├── ulx3s_50.v │ │ ├── ulx3s_50_25.v │ │ ├── ulx3s_50_25_100.v │ │ ├── ulx3s_50_25_100_100ph180.v │ │ ├── ulx3s_50_25_150.v │ │ ├── ulx3s_50_25_50.v │ │ ├── ulx3s_50_25_75.v │ │ ├── ulx3s_60.v │ │ ├── ulx3s_65.v │ │ ├── ulx3s_70.v │ │ ├── ulx3s_75_25.v │ │ ├── ulx3s_80.v │ │ └── ulx3s_90.v │ ├── qpsram2x.si │ ├── sdcard.si │ ├── sdcard_streamer.si │ ├── sdcard_write.si │ ├── sdram_arbitrers.si │ ├── sdram_controller_autoprecharge_pipelined_r512_w64.si │ ├── sdram_controller_autoprecharge_r128_w8.si │ ├── sdram_controller_autoprecharge_r16_w16.si │ ├── sdram_controller_r128_w8.si │ ├── sdram_interfaces.si │ ├── sdram_utils.si │ ├── simple_dual_ram.v │ ├── simul_sdram.v │ ├── simulation_spram.si │ ├── spi.si │ ├── text_buffer.v │ ├── text_buffer_small.v │ ├── uart.si │ ├── ulx3s_test_pll.v │ ├── verilator_data.v │ ├── verilator_data_rw.v │ ├── verilator_random.v │ ├── vga.si │ ├── video_sdram.si │ └── video_sdram_main.si ├── divint_bare │ ├── Makefile │ ├── configs │ └── main.si ├── divstd_bare │ ├── Makefile │ ├── configs │ └── main.si ├── divstd_pipe │ ├── Makefile │ ├── README.md │ ├── configs │ └── main.si ├── doomchip │ ├── Makefile │ ├── README.md │ ├── doomchip.si │ ├── doomchip_debug_placeholder.si │ ├── hdmi_doomchip.si │ ├── lcd_status.si │ ├── lcd_test.si │ ├── lumps │ │ ├── .gitignore │ │ ├── flats │ │ │ └── .gitignore │ │ ├── patches │ │ │ └── .gitignore │ │ └── sprites │ │ │ └── .gitignore │ ├── oled_doomchip.si │ ├── oled_doomhead.si │ ├── oled_test.si │ ├── poslog_debug.txt │ ├── poslog_final.txt │ ├── pre_do_doomhead.lua │ ├── pre_do_sprites.lua │ ├── pre_do_textures.lua │ ├── pre_load_data.lua │ ├── pre_render_test.lua │ ├── pre_wad.lua │ ├── sdram_column_writer.si │ ├── textures │ │ ├── .gitignore │ │ └── assembled │ │ │ └── .gitignore │ ├── vga_doomchip.png │ ├── vga_doomchip.si │ ├── vga_test_sprites.si │ └── vga_test_sprites_texspace.si ├── easy-riscv │ ├── Makefile │ ├── README.md │ ├── configs │ ├── main.si │ ├── oled │ │ ├── Makefile │ │ ├── main.si │ │ ├── oled_ssd1351.h │ │ └── oled_st7789.h │ ├── on_accessed │ │ ├── Makefile │ │ └── main.si │ ├── select_core │ │ ├── Makefile │ │ └── with_ice-v-dual.si │ └── uart_doomfire │ │ ├── Makefile │ │ ├── README.md │ │ └── main.si ├── fire-v │ ├── .gitignore │ ├── Makefile │ ├── Makefile.blaze │ ├── Makefile.dev │ ├── Makefile.export │ ├── Makefile.inferno │ ├── Makefile.spark │ ├── Makefile.test │ ├── README.md │ ├── ash │ │ ├── bram_ram_32bits.si │ │ ├── bram_segment_ram_32bits.si │ │ ├── bram_segment_spram_32bits.si │ │ └── sdram_ram_32bits.si │ ├── bin │ │ ├── sdcard │ │ │ ├── cubes.img │ │ │ ├── dhrystone.img │ │ │ └── leds.img │ │ └── ulx3s │ │ │ ├── blaze-synth.png │ │ │ ├── blaze_200mhz.bit │ │ │ ├── wildfire-synth.png │ │ │ └── wildfire_160mhz.bit │ ├── blaze.si │ ├── build │ │ └── .gitignore │ ├── compile_asm.sh │ ├── compile_boot_sdcard.sh │ ├── compile_boot_spiflash.sh │ ├── compile_c.sh │ ├── compile_c_blaze.sh │ ├── compile_c_blaze_native.sh │ ├── compile_dhrystone.sh │ ├── compile_to_blaze.sh │ ├── compile_to_inferno.sh │ ├── compile_to_spark.sh │ ├── compile_to_wildfire.sh │ ├── configs │ ├── doc │ │ ├── AssemblingFramework.md │ │ ├── DualCore.md │ │ ├── MemoryMap.md │ │ ├── edge-walk-spans.png │ │ ├── figures.pptx │ │ ├── fire-v.md │ │ ├── flame.md │ │ ├── inferno-arch.png │ │ ├── span-chunks.png │ │ └── wildfire-arch.png │ ├── export-verilog │ │ ├── .gitignore │ │ └── firev.v │ ├── fire-v │ │ ├── fire-v.si │ │ └── risc-v.si │ ├── flame │ │ └── flame.si │ ├── freq_stats.sh │ ├── inferno.si │ ├── make_font.si │ ├── make_sdcard.si │ ├── pre │ │ ├── pre_include_asm.lua │ │ └── pre_tga2c.lua │ ├── smoke │ │ ├── boot │ │ │ ├── boot_sdcard.c │ │ │ └── boot_spiflash.c │ │ ├── config_asm.ld │ │ ├── config_blaze.ld │ │ ├── config_blaze_boot.ld │ │ ├── config_cpu0.ld │ │ ├── config_cpu1.ld │ │ ├── crt0.s │ │ ├── crt0_boot.s │ │ ├── dhrystone │ │ │ ├── README.md │ │ │ ├── dhry.c │ │ │ ├── dhry.h │ │ │ ├── dhry_1.c │ │ │ └── dhry_2.c │ │ ├── mylibc │ │ │ ├── div.s │ │ │ ├── flame.c │ │ │ ├── flame.h │ │ │ ├── font.h │ │ │ ├── mylibc.c │ │ │ ├── mylibc.h │ │ │ ├── sdcard.c │ │ │ ├── sdcard.h │ │ │ ├── spiflash.c │ │ │ ├── spiflash.h │ │ │ └── tama_mini02_font.h │ │ └── tests │ │ │ ├── README.md │ │ │ ├── add.c │ │ │ ├── audio.c │ │ │ ├── bunny3d.h │ │ │ ├── code.h │ │ │ ├── code_blaze.h │ │ │ ├── come_on.raw │ │ │ ├── cpu0.raw │ │ │ ├── cpu1.raw │ │ │ ├── cubes.c │ │ │ ├── dino3d.h │ │ │ ├── exec_far.c │ │ │ ├── exec_far_blaze.c │ │ │ ├── fonts │ │ │ └── FCUBEF2.h │ │ │ ├── friend.raw │ │ │ ├── gold.tga │ │ │ ├── he_is_right.raw │ │ │ ├── hi_sorry.raw │ │ │ ├── ibrkrcubes.c │ │ │ ├── ibrkrshape.c │ │ │ ├── ibrkrspiflash.c │ │ │ ├── ibrkrsquare.c │ │ │ ├── ibrkrtrsf.c │ │ │ ├── ibrkrvga1.c │ │ │ ├── leds.c │ │ │ ├── leds_2.c │ │ │ ├── leds_3.c │ │ │ ├── left.raw │ │ │ ├── pal.c │ │ │ ├── print.c │ │ │ ├── printflash.c │ │ │ ├── ramp.c │ │ │ ├── ramp_32.c │ │ │ ├── ramrw.c │ │ │ ├── ramrw_printf.c │ │ │ ├── read.c │ │ │ ├── right.raw │ │ │ ├── sdcard1.c │ │ │ ├── sdcard2.c │ │ │ ├── silence.raw │ │ │ ├── speak_l.raw │ │ │ ├── speak_r.raw │ │ │ ├── spiflsh_write.c │ │ │ ├── spiflsh_write_4kb_move.c │ │ │ ├── test1.s │ │ │ ├── test2.s │ │ │ ├── test3.s │ │ │ ├── test4.s │ │ │ ├── test_bram.c │ │ │ ├── text.c │ │ │ ├── tri_ut1.c │ │ │ ├── xmas.c │ │ │ ├── xmas1.raw │ │ │ ├── xmas2.raw │ │ │ └── xmas_bkg.rawraw │ ├── spark.si │ └── wildfire.si ├── flashbang │ ├── Makefile │ ├── README.md │ ├── compile.sh │ └── firmware.c ├── gallery.png ├── hdmi_test │ ├── Makefile │ ├── README.md │ ├── hdmi_test.jpg │ └── hdmi_test.si ├── i2s_audio │ ├── Makefile │ ├── README.md │ ├── audio_pcm.jpg │ └── main.si ├── ice-v │ ├── CPUs │ │ ├── ice-v-conveyor.si │ │ ├── ice-v-dual-compact.si │ │ ├── ice-v-dual-fermata.si │ │ ├── ice-v-dual.si │ │ ├── ice-v-ram.si │ │ ├── ice-v-swirl-compact.si │ │ ├── ice-v-swirl.si │ │ └── ice-v.si │ ├── IceV.md │ ├── IceVDual.md │ ├── IceVDualFermata.md │ ├── Makefile │ ├── Makefile.cmp │ ├── Makefile.conveyor │ ├── Makefile.dual │ ├── Makefile.fermata_demo │ ├── Makefile.icestick_doom │ ├── Makefile.icestick_doom_2x │ ├── Makefile.oled │ ├── Makefile.pmod │ ├── Makefile.ram │ ├── Makefile.swirl │ ├── Makefile.swirl-cache │ ├── Makefile.test │ ├── README.md │ ├── SOCs │ │ ├── ice-v-i2s-audio.si │ │ ├── ice-v-oled.si │ │ ├── ice-v-soc-cmp.si │ │ ├── ice-v-soc-cmp.si.cpp │ │ ├── ice-v-soc-cmp.si.h │ │ ├── ice-v-soc-conveyor.si │ │ ├── ice-v-soc-dual-fermata.si │ │ ├── ice-v-soc-dual.si │ │ ├── ice-v-soc-ram-2x.si │ │ ├── ice-v-soc-ram.si │ │ ├── ice-v-soc-swirl-cache.si │ │ ├── ice-v-soc-swirl.si │ │ ├── ice-v-soc.si │ │ ├── pre_include_compiled.lua │ │ └── swirl-cache.si │ ├── SPIscreen.md │ ├── compile │ │ ├── build │ │ │ └── .gitignore │ │ ├── cmp │ │ │ ├── compile_c.sh │ │ │ ├── compile_dhrystone.sh │ │ │ ├── config_c.ld │ │ │ ├── crt0.s │ │ │ ├── mylibc.c │ │ │ ├── mylibc.h │ │ │ └── test.c │ │ ├── icebreaker │ │ │ ├── conveyor │ │ │ │ ├── compile_c.sh │ │ │ │ ├── config_c.ld │ │ │ │ └── crt0.s │ │ │ ├── dual │ │ │ │ ├── compile_c.sh │ │ │ │ ├── compile_c_ext.sh │ │ │ │ ├── config.ld │ │ │ │ ├── config_boot.ld │ │ │ │ └── crt0.s │ │ │ ├── fermata │ │ │ │ ├── compile_c.sh │ │ │ │ ├── config_c.ld │ │ │ │ └── crt0_dual.s │ │ │ ├── ice-v │ │ │ │ ├── compile_c.sh │ │ │ │ ├── config_c.ld │ │ │ │ └── crt0.s │ │ │ ├── swirl-cache │ │ │ │ ├── compile_asm.sh │ │ │ │ ├── compile_c.sh │ │ │ │ ├── config_c.ld │ │ │ │ └── crt0.s │ │ │ └── swirl │ │ │ │ ├── compile_c.sh │ │ │ │ ├── config_c.ld │ │ │ │ └── crt0.s │ │ └── icestick │ │ │ ├── conveyor │ │ │ ├── compile_c.sh │ │ │ ├── config_c.ld │ │ │ └── crt0.s │ │ │ ├── dual │ │ │ ├── compile_c.sh │ │ │ ├── config_c.ld │ │ │ └── crt0.s │ │ │ ├── ice-v │ │ │ ├── compile_asm.sh │ │ │ ├── compile_c.sh │ │ │ ├── config_asm.ld │ │ │ ├── config_c.ld │ │ │ └── crt0.s │ │ │ └── ram │ │ │ ├── compile_c.sh │ │ │ ├── config_c.ld │ │ │ └── crt0.s │ ├── configs │ ├── export │ │ ├── Makefile │ │ └── export.si │ ├── ice-v-98.png │ ├── ice-v-doom-fire.png │ ├── ice-v-dual-120.png │ ├── ice-v-dual-demo.png │ ├── ice-v-fermata-tunnel.png │ ├── icebreaker-creset.png │ ├── make_spiflash.si │ ├── oled-pmod-4wires.jpg │ └── src │ │ ├── config.h │ │ ├── dual_demo.c │ │ ├── dual_fractal.c │ │ ├── dual_fractal_table.h │ │ ├── dual_lotus.c │ │ ├── dual_test1.c │ │ ├── dual_test2.c │ │ ├── dual_test_leds.c │ │ ├── dual_test_oled.c │ │ ├── dual_test_sound.c │ │ ├── dual_test_spiflash_oled.c │ │ ├── dual_test_spiflash_sound.c │ │ ├── fire.c │ │ ├── floats.c │ │ ├── icebreaker-fermata │ │ └── config.h │ │ ├── icebreaker-swirl-cache │ │ └── config.h │ │ ├── icebreaker-swirl │ │ └── config.h │ │ ├── icebreaker │ │ ├── boot_spiflash.c │ │ └── config.h │ │ ├── icestick-conveyor │ │ └── config.h │ │ ├── icestick-ram │ │ └── config.h │ │ ├── icestick │ │ ├── config.h │ │ ├── test1.s │ │ ├── test2.s │ │ ├── test3.s │ │ ├── test4.s │ │ └── test5.s │ │ ├── oled.h │ │ ├── pre_tunnel.cc │ │ ├── printf.c │ │ ├── printf.h │ │ ├── spiflash.c │ │ ├── starfield.c │ │ ├── test_call.c │ │ ├── test_composite_mem.c │ │ ├── test_div.s │ │ ├── test_fermata_vram.c │ │ ├── test_leds.c │ │ ├── test_leds_simul.c │ │ ├── test_oled.c │ │ ├── test_pip.s │ │ ├── test_shift.c │ │ ├── test_sound.c │ │ ├── test_spiflash.c │ │ ├── test_uart.c │ │ ├── tunnel_fermata.c │ │ ├── tunnel_map.h │ │ ├── tunnel_text.h │ │ ├── tunnel_text2.h │ │ ├── tunnel_text3.h │ │ └── tunnel_text4.h ├── ice40-dynboot │ ├── Makefile │ ├── README.md │ ├── bin │ │ ├── .gitignore │ │ ├── header.bin │ │ └── package.bin │ ├── blinky_reboot │ │ ├── Makefile │ │ └── blinky_reboot.si │ ├── bram_fill │ │ ├── Makefile │ │ ├── bram_fill.si │ │ └── ice40_bram.v │ ├── bram_show │ │ ├── Makefile │ │ └── bram_show.si │ ├── build │ │ └── .gitignore │ ├── compile.sh │ ├── firmware.c │ ├── header.png │ ├── spram_fill │ │ ├── Makefile │ │ └── spram_fill.si │ ├── spram_show │ │ ├── Makefile │ │ └── spram_show.si │ └── try.sh ├── ice40-warmboot │ ├── Makefile │ ├── README.md │ ├── bin │ │ └── multi.bin │ ├── blinky1.si │ └── blinky2.si ├── inout │ ├── Makefile │ ├── README.md │ └── inout.si ├── kbfcrabe │ ├── Makefile │ ├── README.md │ ├── bridge_closeup_1.jpg │ ├── bridge_closeup_2.jpg │ ├── doom-fire.jpg │ ├── enable_ready.png │ ├── kbfcrabe_side.jpg │ ├── lcd_ili9351.h │ ├── main.si │ └── orangecrab_pins.jpg ├── lcd_test │ ├── Makefile │ ├── Makefile.simulation │ ├── README.md │ ├── hello-silice.jpg │ ├── ice40-schematic.png │ └── main.si ├── mulint_bare │ ├── Makefile │ ├── configs │ └── main.si ├── mulint_pipe_bare │ ├── Makefile │ ├── configs │ └── main.si ├── neopixel │ ├── Makefile │ └── main.si ├── neopixel_uart │ ├── Makefile │ ├── main.si │ ├── main_x4.si │ ├── mapping.py │ └── send.py ├── oled_sdcard_test │ ├── Makefile │ ├── Makefile.imgview │ ├── README.md │ ├── configs │ ├── oled_imgview.jpg │ ├── oled_sdcard_imgview.si │ ├── oled_sdcard_test.si │ ├── pre_sdcard_image.lua │ └── test.tga ├── oled_test │ ├── Makefile │ ├── README.md │ ├── configs │ └── oled_test.si ├── oled_text │ ├── Makefile │ ├── configs │ └── oled_text.si ├── pipeline_sort │ ├── Makefile │ ├── README.md │ ├── configs │ ├── main.si │ └── pipeline_sort.jpg ├── qpsram │ ├── Makefile │ ├── README.md │ ├── bitstreams │ │ ├── ecpix5.bit │ │ ├── icebreaker.bin │ │ ├── icestick.bin │ │ └── ulx3s.bin │ ├── ecpix5_qqspi.jpg │ ├── example.jpg │ ├── export │ │ ├── M_qpsram_ram.v │ │ ├── Makefile │ │ └── export.si │ ├── icebreaker_qqspi.jpg │ ├── icestick_qqspi.jpg │ ├── memtest.py │ ├── ulx3s_qqspi.jpg │ ├── xfer.py │ └── xfer.si ├── rsqrt │ ├── Makefile │ ├── clz.si │ ├── main.si │ └── rsqrt.si ├── sdram_memtest │ ├── Makefile │ ├── configs │ └── sdram_memtest.si ├── sdram_test │ ├── Makefile │ ├── README.md │ ├── configs │ └── sdram_test.si ├── spiflash │ ├── Makefile │ ├── Makefile.exit_qspi │ ├── Makefile.test │ ├── README.md │ ├── W25Q128JVxIM │ │ ├── MEM.TXT │ │ └── SREG.TXT │ ├── bitstreams │ │ └── ulx3s_exit_qspi.bit │ ├── configs │ ├── ddr_clock.v │ ├── exit_qspi.si │ ├── simul_spiflash_m.v │ ├── simul_spiflash_w.v │ ├── spiflash1x.si │ ├── spiflash2x.si │ ├── spiflash4x.si │ ├── stream.si │ ├── xfer.py │ └── xfer.si ├── terrain │ ├── Makefile │ ├── Makefile.test │ ├── README.md │ ├── all_interp.png │ ├── bin │ │ └── icebreaker.bin │ ├── build.sh │ ├── build │ │ └── .gitignore │ ├── compile.sh │ ├── configs │ ├── data │ │ ├── .gitignore │ │ └── README.md │ ├── figure_yc.png │ ├── figure_zsteps.gif │ ├── figure_zsteps.png │ ├── figure_zsteps.sh │ ├── firmware.c │ ├── firmware_simul.c │ ├── main.si │ ├── make_spiflash.si │ ├── no_interp.png │ ├── palette.png │ ├── param.si │ ├── pre │ │ └── pre_packdata.lua │ ├── simul.sh │ ├── terrain_renderer.si │ ├── terrains.h │ ├── terrains.img │ ├── try.sh │ ├── video.gif │ └── z_interp.png ├── test_all.sh ├── uart_echo │ ├── Makefile │ ├── configs │ └── uart_echo.si ├── verilog-export │ ├── Makefile │ ├── README.md │ ├── export_controller.si │ ├── leds.jpg │ └── sdram_example.v ├── vga_dac.jpg ├── vga_demo │ ├── Makefile │ ├── Makefile.circles │ ├── Makefile.copperbars │ ├── Makefile.flyover3d │ ├── Makefile.humanshader │ ├── Makefile.mc │ ├── Makefile.msponge │ ├── Makefile.rototexture │ ├── README.md │ ├── configs │ ├── msponge.cpp │ ├── random.v │ ├── tile.tga │ ├── vga_circles.si │ ├── vga_copperbars.si │ ├── vga_demo_copperbars.png │ ├── vga_demo_flyover3d.png │ ├── vga_demo_main.si │ ├── vga_demo_rototex.png │ ├── vga_flyover3d.si │ ├── vga_humanshader.si │ ├── vga_mc.si │ ├── vga_msponge.si │ └── vga_rototexture.si ├── vga_test │ ├── Makefile │ ├── configs │ ├── vga_test.png │ └── vga_test.si ├── vga_text_buffer │ ├── Makefile │ ├── README.md │ ├── configs │ ├── vga_text_buffer.png │ └── vga_text_buffer.si ├── vga_wfc │ ├── Makefile │ ├── configs │ ├── pre_rules.lua │ ├── problems │ │ ├── README.md │ │ ├── circuits │ │ │ ├── rules.txt │ │ │ ├── tile_00.tga │ │ │ ├── tile_01.tga │ │ │ ├── tile_02.tga │ │ │ ├── tile_03.tga │ │ │ ├── tile_04.tga │ │ │ ├── tile_05.tga │ │ │ ├── tile_06.tga │ │ │ ├── tile_07.tga │ │ │ ├── tile_08.tga │ │ │ ├── tile_09.tga │ │ │ ├── tile_10.tga │ │ │ ├── tile_11.tga │ │ │ ├── tile_12.tga │ │ │ ├── tile_13.tga │ │ │ ├── tile_14.tga │ │ │ ├── tile_15.tga │ │ │ ├── tile_16.tga │ │ │ ├── tile_17.tga │ │ │ ├── tile_18.tga │ │ │ ├── tile_19.tga │ │ │ ├── tile_20.tga │ │ │ ├── tile_21.tga │ │ │ ├── tile_22.tga │ │ │ ├── tile_23.tga │ │ │ ├── tile_24.tga │ │ │ ├── tile_25.tga │ │ │ ├── tile_26.tga │ │ │ ├── tile_27.tga │ │ │ ├── tile_28.tga │ │ │ ├── tile_29.tga │ │ │ ├── tile_30.tga │ │ │ ├── tile_31.tga │ │ │ ├── tile_32.tga │ │ │ ├── tile_33.tga │ │ │ ├── tile_34.tga │ │ │ ├── tile_35.tga │ │ │ ├── tile_36.tga │ │ │ ├── tile_37.tga │ │ │ ├── tile_38.tga │ │ │ └── tile_39.tga │ │ ├── knots │ │ │ ├── rules.txt │ │ │ ├── tile_00.tga │ │ │ ├── tile_01.tga │ │ │ ├── tile_02.tga │ │ │ ├── tile_03.tga │ │ │ ├── tile_04.tga │ │ │ ├── tile_05.tga │ │ │ ├── tile_06.tga │ │ │ ├── tile_07.tga │ │ │ ├── tile_08.tga │ │ │ ├── tile_09.tga │ │ │ ├── tile_10.tga │ │ │ ├── tile_11.tga │ │ │ └── tile_12.tga │ │ ├── paths │ │ │ ├── rules.txt │ │ │ ├── tile_00.tga │ │ │ ├── tile_01.tga │ │ │ ├── tile_02.tga │ │ │ ├── tile_03.tga │ │ │ ├── tile_04.tga │ │ │ ├── tile_05.tga │ │ │ ├── tile_06.tga │ │ │ ├── tile_07.tga │ │ │ ├── tile_08.tga │ │ │ ├── tile_09.tga │ │ │ ├── tile_10.tga │ │ │ ├── tile_11.tga │ │ │ ├── tile_12.tga │ │ │ ├── tile_13.tga │ │ │ └── tile_14.tga │ │ └── summer │ │ │ ├── rules.txt │ │ │ ├── tile_00.tga │ │ │ ├── tile_01.tga │ │ │ ├── tile_02.tga │ │ │ ├── tile_03.tga │ │ │ ├── tile_04.tga │ │ │ ├── tile_05.tga │ │ │ ├── tile_06.tga │ │ │ ├── tile_07.tga │ │ │ ├── tile_08.tga │ │ │ ├── tile_09.tga │ │ │ ├── tile_10.tga │ │ │ ├── tile_11.tga │ │ │ ├── tile_12.tga │ │ │ ├── tile_13.tga │ │ │ ├── tile_14.tga │ │ │ ├── tile_15.tga │ │ │ ├── tile_16.tga │ │ │ ├── tile_17.tga │ │ │ ├── tile_18.tga │ │ │ ├── tile_19.tga │ │ │ ├── tile_20.tga │ │ │ ├── tile_21.tga │ │ │ ├── tile_22.tga │ │ │ ├── tile_23.tga │ │ │ ├── tile_24.tga │ │ │ ├── tile_25.tga │ │ │ ├── tile_26.tga │ │ │ ├── tile_27.tga │ │ │ ├── tile_28.tga │ │ │ ├── tile_29.tga │ │ │ ├── tile_30.tga │ │ │ ├── tile_31.tga │ │ │ ├── tile_32.tga │ │ │ ├── tile_33.tga │ │ │ ├── tile_34.tga │ │ │ ├── tile_35.tga │ │ │ ├── tile_36.tga │ │ │ ├── tile_37.tga │ │ │ ├── tile_38.tga │ │ │ └── tile_39.tga │ ├── vga_wfc_basic.si │ └── vga_wfc_tiled.si ├── video_sdram_test │ ├── Makefile │ ├── configs │ ├── video_sdram_test.png │ └── video_sdram_test.si └── wolfpga │ ├── Makefile │ ├── README.md │ ├── configs │ ├── wolf.tga │ ├── wolfpga.png │ └── wolfpga.si ├── python ├── CMakeLists.txt ├── README.md ├── pysilice.cpp ├── setup.py ├── silice │ ├── __init__.py │ ├── migen.py │ └── silice.py └── tests │ ├── icebreaker_blinky.py │ └── lambdaconcept_ecpix5.py ├── src ├── Algorithm.cpp ├── Algorithm.h ├── Blueprint.cpp ├── Blueprint.h ├── ChangeLog.cpp ├── ChangeLog.h ├── ChangeLog_descriptions.inc ├── Config.cpp ├── Config.h ├── ExpressionLinter.cpp ├── ExpressionLinter.h ├── LuaPreProcessor.cpp ├── LuaPreProcessor.h ├── Module.h ├── ParsingContext.cpp ├── ParsingContext.h ├── ParsingErrors.cpp ├── ParsingErrors.h ├── RISCVSynthesizer.cpp ├── RISCVSynthesizer.h ├── SiliceCompiler.cpp ├── SiliceCompiler.h ├── TypesAndConsts.cpp ├── TypesAndConsts.h ├── Utils.cpp ├── Utils.h ├── VerilogTemplate.cpp ├── VerilogTemplate.h ├── libs │ ├── lua │ │ ├── CMakeLists.txt │ │ ├── Makefile │ │ ├── README │ │ ├── doc │ │ │ ├── contents.html │ │ │ ├── index.css │ │ │ ├── logo.gif │ │ │ ├── lua.1 │ │ │ ├── lua.css │ │ │ ├── luac.1 │ │ │ ├── manual.css │ │ │ ├── manual.html │ │ │ ├── osi-certified-72x60.png │ │ │ └── readme.html │ │ └── src │ │ │ ├── Makefile │ │ │ ├── lapi.c │ │ │ ├── lapi.h │ │ │ ├── lauxlib.c │ │ │ ├── lauxlib.h │ │ │ ├── lbaselib.c │ │ │ ├── lbitlib.c │ │ │ ├── lcode.c │ │ │ ├── lcode.h │ │ │ ├── lcorolib.c │ │ │ ├── lctype.c │ │ │ ├── lctype.h │ │ │ ├── ldblib.c │ │ │ ├── ldebug.c │ │ │ ├── ldebug.h │ │ │ ├── ldo.c │ │ │ ├── ldo.h │ │ │ ├── ldump.c │ │ │ ├── lfunc.c │ │ │ ├── lfunc.h │ │ │ ├── lgc.c │ │ │ ├── lgc.h │ │ │ ├── linit.c │ │ │ ├── liolib.c │ │ │ ├── llex.c │ │ │ ├── llex.h │ │ │ ├── llimits.h │ │ │ ├── lmathlib.c │ │ │ ├── lmem.c │ │ │ ├── lmem.h │ │ │ ├── loadlib.c │ │ │ ├── lobject.c │ │ │ ├── lobject.h │ │ │ ├── lopcodes.c │ │ │ ├── lopcodes.h │ │ │ ├── loslib.c │ │ │ ├── lparser.c │ │ │ ├── lparser.h │ │ │ ├── lprefix.h │ │ │ ├── lstate.c │ │ │ ├── lstate.h │ │ │ ├── lstring.c │ │ │ ├── lstring.h │ │ │ ├── lstrlib.c │ │ │ ├── ltable.c │ │ │ ├── ltable.h │ │ │ ├── ltablib.c │ │ │ ├── ltm.c │ │ │ ├── ltm.h │ │ │ ├── lua.c │ │ │ ├── lua.h │ │ │ ├── lua.hpp │ │ │ ├── luac.c │ │ │ ├── luaconf.h │ │ │ ├── lualib.h │ │ │ ├── lundump.c │ │ │ ├── lundump.h │ │ │ ├── lutf8lib.c │ │ │ ├── lvm.c │ │ │ ├── lvm.h │ │ │ ├── lzio.c │ │ │ └── lzio.h │ ├── luabind-deboostified │ │ ├── .gitignore │ │ ├── .gitmodules │ │ ├── CMakeLists.txt │ │ ├── LICENSE │ │ ├── README.md │ │ ├── doc │ │ │ ├── CMakeLists.txt │ │ │ ├── GetGitRevisionDescription.cmake │ │ │ ├── GetGitRevisionDescription.cmake.in │ │ │ ├── adopt.rst │ │ │ ├── building.rst │ │ │ ├── changes.txt │ │ │ ├── copy.rst │ │ │ ├── dependency.rst │ │ │ ├── discard_result.rst │ │ │ ├── docs.rst │ │ │ ├── luabind-logo-label.ps │ │ │ ├── luabind.png │ │ │ ├── out_value.rst │ │ │ ├── pure_out_value.rst │ │ │ ├── raw.rst │ │ │ ├── return_reference_to.rst │ │ │ ├── return_stl_iterator.rst │ │ │ ├── style.css │ │ │ ├── version.rst.in │ │ │ └── yield.rst │ │ ├── examples │ │ │ ├── any_converter │ │ │ │ └── any_converter.cpp │ │ │ ├── cln │ │ │ │ ├── README │ │ │ │ ├── cln_test.cpp │ │ │ │ └── cln_test.lua │ │ │ ├── filesystem │ │ │ │ ├── directory_iterator.hpp │ │ │ │ ├── filesystem.cpp │ │ │ │ └── inspect.lua │ │ │ ├── glut │ │ │ │ ├── glut_bind.cpp │ │ │ │ └── glut_bindings.lua │ │ │ ├── hello_world │ │ │ │ ├── README │ │ │ │ └── hello_world.cpp │ │ │ ├── intrusive_ptr │ │ │ │ └── intrusive_ptr.cpp │ │ │ └── regexp │ │ │ │ ├── regex.lua │ │ │ │ └── regex_wrap.cpp │ │ ├── luabind │ │ │ ├── adopt_policy.hpp │ │ │ ├── back_reference.hpp │ │ │ ├── back_reference_fwd.hpp │ │ │ ├── class.hpp │ │ │ ├── class_info.hpp │ │ │ ├── config.hpp │ │ │ ├── container_policy.hpp │ │ │ ├── copy_policy.hpp │ │ │ ├── dependency_policy.hpp │ │ │ ├── detail │ │ │ │ ├── call.hpp │ │ │ │ ├── call_function.hpp │ │ │ │ ├── call_member.hpp │ │ │ │ ├── call_shared.hpp │ │ │ │ ├── call_traits.hpp │ │ │ │ ├── class_registry.hpp │ │ │ │ ├── class_rep.hpp │ │ │ │ ├── constructor.hpp │ │ │ │ ├── conversion_policies │ │ │ │ │ ├── conversion_base.hpp │ │ │ │ │ ├── conversion_policies.hpp │ │ │ │ │ ├── enum_converter.hpp │ │ │ │ │ ├── function_converter.hpp │ │ │ │ │ ├── lua_proxy_converter.hpp │ │ │ │ │ ├── native_converter.hpp │ │ │ │ │ ├── pointer_converter.hpp │ │ │ │ │ ├── reference_converter.hpp │ │ │ │ │ └── value_converter.hpp │ │ │ │ ├── conversion_storage.hpp │ │ │ │ ├── convert_to_lua.hpp │ │ │ │ ├── crtp_iterator.hpp │ │ │ │ ├── debug.hpp │ │ │ │ ├── decorate_type.hpp │ │ │ │ ├── deduce_signature.hpp │ │ │ │ ├── enum_maker.hpp │ │ │ │ ├── format_signature.hpp │ │ │ │ ├── garbage_collector.hpp │ │ │ │ ├── has_get_pointer.hpp │ │ │ │ ├── inheritance.hpp │ │ │ │ ├── instance_holder.hpp │ │ │ │ ├── link_compatibility.hpp │ │ │ │ ├── make_instance.hpp │ │ │ │ ├── meta.hpp │ │ │ │ ├── most_derived.hpp │ │ │ │ ├── object.hpp │ │ │ │ ├── object_rep.hpp │ │ │ │ ├── open.hpp │ │ │ │ ├── operator_id.hpp │ │ │ │ ├── other.hpp │ │ │ │ ├── pcall.hpp │ │ │ │ ├── pointee_sizeof.hpp │ │ │ │ ├── pointee_typeid.hpp │ │ │ │ ├── policy.hpp │ │ │ │ ├── primitives.hpp │ │ │ │ ├── property.hpp │ │ │ │ ├── ref.hpp │ │ │ │ ├── signature_match.hpp │ │ │ │ ├── stack_utils.hpp │ │ │ │ ├── typetraits.hpp │ │ │ │ └── yes_no.hpp │ │ │ ├── discard_result_policy.hpp │ │ │ ├── error.hpp │ │ │ ├── error_callback_fun.hpp │ │ │ ├── exception_handler.hpp │ │ │ ├── from_stack.hpp │ │ │ ├── function.hpp │ │ │ ├── function_introspection.hpp │ │ │ ├── get_main_thread.hpp │ │ │ ├── handle.hpp │ │ │ ├── iterator_policy.hpp │ │ │ ├── lua_argument_proxy.hpp │ │ │ ├── lua_include.hpp │ │ │ ├── lua_index_proxy.hpp │ │ │ ├── lua_iterator_proxy.hpp │ │ │ ├── lua_proxy.hpp │ │ │ ├── lua_proxy_interface.hpp │ │ │ ├── lua_state_fwd.hpp │ │ │ ├── luabind.hpp │ │ │ ├── make_function.hpp │ │ │ ├── nil.hpp │ │ │ ├── no_dependency.hpp │ │ │ ├── object.hpp │ │ │ ├── open.hpp │ │ │ ├── operator.hpp │ │ │ ├── out_value_policy.hpp │ │ │ ├── pointer_traits.hpp │ │ │ ├── prefix.hpp │ │ │ ├── raw_policy.hpp │ │ │ ├── return_reference_to_policy.hpp │ │ │ ├── scope.hpp │ │ │ ├── set_package_preload.hpp │ │ │ ├── shared_ptr_converter.hpp │ │ │ ├── tag_function.hpp │ │ │ ├── typeid.hpp │ │ │ ├── version.hpp │ │ │ ├── weak_ref.hpp │ │ │ ├── wrapper_base.hpp │ │ │ └── yield_policy.hpp │ │ ├── src │ │ │ ├── CMakeLists.txt │ │ │ ├── class.cpp │ │ │ ├── class_info.cpp │ │ │ ├── class_registry.cpp │ │ │ ├── class_rep.cpp │ │ │ ├── create_class.cpp │ │ │ ├── error.cpp │ │ │ ├── exception_handler.cpp │ │ │ ├── function.cpp │ │ │ ├── function_introspection.cpp │ │ │ ├── headertest.cpp │ │ │ ├── inheritance.cpp │ │ │ ├── link_compatibility.cpp │ │ │ ├── object_rep.cpp │ │ │ ├── open.cpp │ │ │ ├── operator.cpp │ │ │ ├── pcall.cpp │ │ │ ├── scope.cpp │ │ │ ├── set_package_preload.cpp │ │ │ ├── stack_content_by_name.cpp │ │ │ ├── weak_ref.cpp │ │ │ └── wrapper_base.cpp │ │ └── test │ │ │ ├── CMakeLists.txt │ │ │ ├── benchmark.cpp │ │ │ ├── main.cpp │ │ │ ├── test.hpp │ │ │ ├── test_abstract_base.cpp │ │ │ ├── test_adopt.cpp │ │ │ ├── test_adopt_wrapper.cpp │ │ │ ├── test_attributes.cpp │ │ │ ├── test_automatic_smart_ptr.cpp │ │ │ ├── test_back_reference.cpp │ │ │ ├── test_builtin_converters.cpp │ │ │ ├── test_class_info.cpp │ │ │ ├── test_collapse_converter.cpp │ │ │ ├── test_const.cpp │ │ │ ├── test_construction.cpp │ │ │ ├── test_create_in_thread.cpp │ │ │ ├── test_def_from_base.cpp │ │ │ ├── test_dynamic_type.cpp │ │ │ ├── test_exception_handlers.cpp │ │ │ ├── test_exceptions.cpp │ │ │ ├── test_extend_class_in_lua.cpp │ │ │ ├── test_free_functions.cpp │ │ │ ├── test_function_introspection.cpp │ │ │ ├── test_headercompile.cpp.in │ │ │ ├── test_held_type.cpp │ │ │ ├── test_implicit_cast.cpp │ │ │ ├── test_implicit_raw.cpp │ │ │ ├── test_iterator.cpp │ │ │ ├── test_lua_classes.cpp │ │ │ ├── test_lua_proxy.cpp │ │ │ ├── test_null_pointer.cpp │ │ │ ├── test_object.cpp │ │ │ ├── test_object_identity.cpp │ │ │ ├── test_operators.cpp │ │ │ ├── test_package_preload.cpp │ │ │ ├── test_policies.cpp │ │ │ ├── test_private_destructors.cpp │ │ │ ├── test_properties.cpp │ │ │ ├── test_scope.cpp │ │ │ ├── test_separation.cpp │ │ │ ├── test_set_instance_value.cpp │ │ │ ├── test_shadow.cpp │ │ │ ├── test_shared_ptr.cpp │ │ │ ├── test_simple_class.cpp │ │ │ ├── test_smart_ptr_attributes.cpp │ │ │ ├── test_super_leak.cpp │ │ │ ├── test_table.cpp │ │ │ ├── test_tag_function.cpp │ │ │ ├── test_typetraits.cpp │ │ │ ├── test_unsigned_int.cpp │ │ │ ├── test_user_defined_converter.cpp │ │ │ ├── test_vector_of_object.cpp │ │ │ ├── test_virtual_inheritance.cpp │ │ │ └── test_yield.cpp │ └── tclap │ │ ├── AUTHORS │ │ ├── COPYING │ │ ├── ChangeLog │ │ ├── INSTALL │ │ ├── NEWS │ │ ├── README │ │ └── include │ │ └── tclap │ │ ├── Arg.h │ │ ├── ArgException.h │ │ ├── ArgTraits.h │ │ ├── CmdLine.h │ │ ├── CmdLineInterface.h │ │ ├── CmdLineOutput.h │ │ ├── Constraint.h │ │ ├── DocBookOutput.h │ │ ├── HelpVisitor.h │ │ ├── IgnoreRestVisitor.h │ │ ├── MultiArg.h │ │ ├── MultiSwitchArg.h │ │ ├── OptionalUnlabeledTracker.h │ │ ├── StandardTraits.h │ │ ├── StdOutput.h │ │ ├── SwitchArg.h │ │ ├── UnlabeledMultiArg.h │ │ ├── UnlabeledValueArg.h │ │ ├── ValueArg.h │ │ ├── ValuesConstraint.h │ │ ├── VersionVisitor.h │ │ ├── Visitor.h │ │ ├── XorHandler.h │ │ └── ZshCompletionOutput.h ├── silice.cpp ├── tga.cpp └── tga.h ├── tests ├── .gitignore ├── Makefile ├── Makefile.icarus ├── Makefile.icestick ├── alg0.si ├── alg1.si ├── alg2.si ├── alg_call_autorun.si ├── alg_call_bind.si ├── alg_call_grp.si ├── alg_call_sub.si ├── alg_output_init.si ├── alg_output_init_grp.si ├── alg_output_init_intrfc.si ├── algtm2.si ├── algtm3.si ├── algtm4.si ├── algtm5.si ├── algtm6.si ├── algtm7.si ├── algtm8.si ├── always.si ├── alwsblk1.si ├── attribs1.si ├── auto1.si ├── autop1.si ├── bfield1.si ├── bfield2.si ├── bind1.si ├── bind2.si ├── bind3.si ├── bind7.si ├── bind8.si ├── bit1.si ├── blkdecl1.si ├── bndwires.si ├── bndwires.v ├── bram1.si ├── bram_data.inc ├── break1.si ├── bug1_dq.si ├── case_dq.si ├── circuits1.si ├── circuits10.si ├── circuits11.si ├── circuits12.si ├── circuits13.si ├── circuits14.si ├── circuits15.si ├── circuits16.si ├── circuits17.si ├── circuits18.si ├── circuits21.si ├── circuits3.si ├── circuits5.si ├── circuits6.si ├── circuits7.si ├── circuits8.si ├── circuits9.si ├── cmdline.si ├── combloop1.si ├── combloop2.si ├── combloop4.si ├── combloop5.si ├── combloop6.si ├── combloop7.si ├── concat.si ├── config1.si ├── dblflipflop.si ├── dbram1.si ├── dbram2.si ├── decl1.si ├── decl2.si ├── decl3.si ├── decl4.si ├── depds1.si ├── depds2.si ├── display1.si ├── divbyten.si ├── divint_hdmi │ ├── README.md │ ├── display.si │ ├── main.si │ └── verilog │ │ ├── async_fifo.v │ │ ├── clk_wiz_v3_6.v │ │ ├── dvi_encoder.v │ │ ├── fifo_2x_reducer.v │ │ ├── hdmi_encoder.v │ │ ├── reset_conditioner.v │ │ ├── serdes_n_to_1.v │ │ ├── simple_dual_ram.v │ │ └── tmds_encoder.v ├── doc1.si ├── error_checks │ ├── .gitignore │ ├── Makefile │ ├── __id.si │ ├── alg1.si │ ├── alg2.si │ ├── alg_call1.si │ ├── alg_call2.si │ ├── alg_call3.si │ ├── alg_call4.si │ ├── alg_call5.si │ ├── alg_call6.si │ ├── alg_call7.si │ ├── alg_call8.si │ ├── alg_inst_dupl.si │ ├── algcomb1.si │ ├── always1.si │ ├── alws1.si │ ├── bind4.si │ ├── bind5.si │ ├── bind6.si │ ├── bindings1.si │ ├── bindings2.si │ ├── bindings3.si │ ├── bindings4.si │ ├── break.si │ ├── call1.si │ ├── circuits19.si │ ├── circuits2.si │ ├── circuits20.si │ ├── circuits4.si │ ├── combcycl.si │ ├── combloop10.si │ ├── combloop11.si │ ├── combloop12.si │ ├── combloop13.si │ ├── combloop15.si │ ├── combloop3.si │ ├── combloop8.si │ ├── combloop9.si │ ├── cyclic_incl1.si │ ├── cyclic_incl2.si │ ├── dupl1.si │ ├── dupl2.si │ ├── dupl3.si │ ├── dupl4.si │ ├── freedecl2.si │ ├── fwd_jumps.si │ ├── inoutshdw1.si │ ├── io1.si │ ├── io2.si │ ├── io3.si │ ├── io4.si │ ├── io5.si │ ├── io6.si │ ├── no_init.si │ ├── outofscope1.si │ ├── outofscope2.si │ ├── pip1.si │ ├── pipeline1.si │ ├── pipeline2.si │ ├── pipeline3.si │ ├── pipeline4.si │ ├── pipfsm1.si │ ├── piptrack.si │ ├── repeat1.si │ ├── reset_conditioner.v │ ├── shdw1.si │ ├── shdw6.si │ ├── shdw7.si │ ├── states1.si │ ├── sub1.si │ ├── sub2.si │ ├── sub3.si │ ├── sub4.si │ ├── sub5.si │ ├── sub6.si │ ├── sub7.si │ ├── sub_vname.si │ ├── tbl1.si │ ├── tbl2.si │ ├── tbl3.si │ ├── tbl4.si │ ├── tbl5.si │ ├── tbl6.si │ ├── test_all.sh │ ├── track1.si │ ├── track2.si │ ├── unit_error1.si │ ├── unit_error2.si │ ├── unit_error3.si │ ├── unit_error4.si │ ├── unkown_var1.si │ ├── unkown_var2.si │ ├── unkown_var3.si │ ├── unkown_var4.si │ ├── unkown_var5.si │ ├── wire1.si │ ├── wire2.si │ └── wire3.si ├── ex_blink.si ├── explint1.si ├── first_example.si ├── flow1.si ├── freedecl1.si ├── fsm1.si ├── globsub1.si ├── goto1.si ├── goto2.si ├── goto3.si ├── group1.si ├── group2.si ├── group3.si ├── ice1.si ├── if1.si ├── if2.si ├── if3.si ├── if_cycle_after.si ├── if_cycle_after_2.si ├── if_cycle_after_3.si ├── if_cycle_after_4.si ├── if_cycle_after_5.si ├── if_goto_break.si ├── inc.si ├── inputff.si ├── interface1.si ├── interface2.si ├── issues │ ├── 103_sub.si │ ├── 108_pmod.si │ ├── 108_pmod_2.si │ ├── 108_rw_perm.si │ ├── 108_shdw.si │ ├── 109_always_after.si │ ├── 109_always_after_2.si │ ├── 112_signed_generics.si │ ├── 113_always_main.si │ ├── 113_main_no_fsm.si │ ├── 120_wire_combloop.si │ ├── 120_wire_combloop_2.si │ ├── 120_wire_combloop_3.si │ ├── 120_wire_combloop_4.si │ ├── 120_wire_combloop_5.si │ ├── 121_wires.si │ ├── 123_bound_vars.si │ ├── 129_assign_tracker.si │ ├── 130_literal_ternary_condition.si │ ├── 132_bound_expr.si │ ├── 133_state_0.si │ ├── 135_array.si │ ├── 145_repbits_concat.si │ ├── 146_no_fsm.si │ ├── 151_inalg.si │ ├── 152_ff_tmp.si │ ├── 152_ff_tmp_sub.si │ ├── 167_widthof.si │ ├── 189_bfield.si │ ├── 189_various.si │ ├── 18_empty_preproc_line.si │ ├── 196_xor.si │ ├── 197_circuits.si │ ├── 208_pmod.si │ ├── 208_widths.si │ ├── 222_subperm.si │ ├── 225_sub.si │ ├── 228_bram.si │ ├── 232_pre.si │ ├── 243_bfield.si │ ├── 247_fsm.si │ ├── 252_subcall.si │ ├── 253_subout.si │ ├── 257_break.si │ ├── 258_inout.si │ ├── 25_comment_preproc.si │ ├── 36_tblpart.si │ ├── 54_d_q.si │ ├── 82_bitfield_table.si │ ├── 97_bitfield_member.si │ ├── Makefile │ ├── Makefile.icarus │ ├── Makefile.techgraph │ └── test_all.sh ├── led1.si ├── led2.si ├── led3.si ├── led4.si ├── led5.si ├── led6.si ├── module1.si ├── noname1.si ├── nonsynth1.si ├── onehot1.si ├── onehotswitch1.si ├── pad2.si ├── param1.si ├── param2.si ├── perms1.si ├── pipeline10.si ├── pipeline11.si ├── pipeline12.si ├── pipeline13.si ├── pipeline14.si ├── pipeline15.si ├── pipeline16.si ├── pipeline17.si ├── pipeline18.si ├── pipeline19.si ├── pipeline2.si ├── pipeline21.si ├── pipeline22.si ├── pipeline23.si ├── pipeline25.si ├── pipeline26.si ├── pipeline27.si ├── pipeline28.si ├── pipeline29.si ├── pipeline3.si ├── pipeline30.si ├── pipeline4.si ├── pipeline5.si ├── pipeline6.si ├── pipeline7.si ├── pipeline8.si ├── pipeline9.si ├── pipeline_alg1.si ├── pipeline_alg2.si ├── pipeline_alg3.si ├── pipeline_alg4.si ├── pipeline_ops.si ├── preproc1.si ├── preproc10.si ├── preproc11.si ├── preproc12.si ├── preproc13.si ├── preproc2.si ├── preproc3.si ├── preproc4.si ├── preproc5.si ├── preproc8.si ├── preproc9.si ├── recurs1.si ├── recurs2.si ├── recurs3.si ├── reginput.si ├── rep1.si ├── return_in_algorithm.si ├── riscv1.si ├── sameas1.si ├── sameas2.si ├── sameas3.si ├── sameas4.si ├── sameas5.si ├── shdw2.si ├── shdw3.si ├── shdw4.si ├── shdw5.si ├── slide1.si ├── stack.si ├── stall1.si ├── stall2.si ├── stall3.si ├── stall4.si ├── stream1.si ├── sub1.si ├── sub2.si ├── sub3.si ├── sub4.si ├── subcall1.si ├── subcall2.si ├── subcall3.si ├── subchain1.si ├── subfsm1.si ├── subr_init.si ├── switch1.si ├── switch2.si ├── syntax_errors │ ├── test_mismatch.si │ ├── test_missing.si │ └── test_unwanted.si ├── tbl1.si ├── tbl4.si ├── tbl5.si ├── test_all.sh ├── test_bram │ ├── Makefile │ ├── bram.si │ └── repro.sh ├── uninit1.si ├── uninit2.si ├── unit1.si ├── unit2.si ├── unit3.si ├── unit4.si ├── unit5.si ├── unit6.si ├── unit7.si ├── varinit1.si ├── varinit2.si ├── varinit3.si ├── vga_quad │ ├── vga_quad.si │ └── wall.tga ├── while1.si ├── while_cycle_after.si ├── while_cycle_after_2.si ├── while_cycle_after_3.si ├── while_cycle_after_4.si ├── while_cycle_after_5.si ├── widthof1.si ├── wire1.si └── wire2.si └── tools ├── bash ├── find_riscv.sh └── riscv_arch.sh ├── emacs └── silice-mode.el ├── notepadpp └── silice_highlight.xml ├── oss-cad-suite-env.sh ├── stl2raw ├── CMakeLists.txt └── stl2raw.cpp ├── sublimeText ├── Silice-icarus.sublime-build ├── Silice-verilator.sublime-build └── Silice.sublime-syntax └── vscode └── extensions └── silice ├── LICENCE.md ├── icon.png ├── language-configuration.json ├── package.json └── syntaxes └── silice.tmLanguage.json /.gitignore: -------------------------------------------------------------------------------- 1 | *.lpp 2 | *.fst 3 | out.v 4 | *.a 5 | *.o 6 | *.d 7 | *.class 8 | *.interp 9 | src/version.inc 10 | BUILD* 11 | antlr/*.tokens 12 | antlr/*Listener.* 13 | antlr/*Lexer.* 14 | antlr/*Parser.* 15 | 16 | # CCLS, the C/C++ LSP 17 | .ccls 18 | .ccls-cache/ 19 | 20 | # Nix 21 | result 22 | -------------------------------------------------------------------------------- /antlr/antlr-4.7.2-complete.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/antlr/antlr-4.7.2-complete.jar -------------------------------------------------------------------------------- /antlr/antlr.bat: -------------------------------------------------------------------------------- 1 | java -cp "antlr-4.7.2-complete.jar;%CLASSPATH%" org.antlr.v4.Tool %* 2 | -------------------------------------------------------------------------------- /antlr/antlr.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | java -cp "antlr-4.7.2-complete.jar" org.antlr.v4.Tool $* 3 | 4 | -------------------------------------------------------------------------------- /antlr/antlr4-cpp-runtime-4.7.2-source/VERSION: -------------------------------------------------------------------------------- 1 | 4.7.2 2 | -------------------------------------------------------------------------------- /antlr/antlr4-cpp-runtime-4.7.2-source/cmake/antlr4-runtime.cmake.in: -------------------------------------------------------------------------------- 1 | set(ANTLR_VERSION @ANTLR_VERSION@) 2 | 3 | @PACKAGE_INIT@ 4 | 5 | set_and_check(ANTLR4_INCLUDE_DIR "@PACKAGE_ANTLR4_INCLUDE_DIR@") 6 | set_and_check(ANTLR4_LIB_DIR "@PACKAGE_ANTLR4_LIB_DIR@") 7 | 8 | include(${CMAKE_CURRENT_LIST_DIR}/@targets_export_name@.cmake) 9 | 10 | check_required_components(antlr) 11 | -------------------------------------------------------------------------------- /antlr/antlr4-cpp-runtime-4.7.2-source/runtime/src/Token.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "Token.h" 7 | 8 | antlr4::Token::~Token() { 9 | } 10 | -------------------------------------------------------------------------------- /antlr/antlr4-cpp-runtime-4.7.2-source/runtime/src/TokenSource.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "TokenSource.h" 7 | 8 | antlr4::TokenSource::~TokenSource() { 9 | } 10 | -------------------------------------------------------------------------------- /antlr/antlr4-cpp-runtime-4.7.2-source/runtime/src/WritableToken.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "WritableToken.h" 7 | 8 | antlr4::WritableToken::~WritableToken() { 9 | } 10 | -------------------------------------------------------------------------------- /antlr/antlr4-cpp-runtime-4.7.2-source/runtime/src/atn/LexerAction.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "LexerAction.h" 7 | 8 | antlr4::atn::LexerAction::~LexerAction() { 9 | } 10 | -------------------------------------------------------------------------------- /antlr/antlr4-cpp-runtime-4.7.2-source/runtime/src/misc/Predicate.cpp: -------------------------------------------------------------------------------- 1 | #include "misc/Predicate.h" 2 | 3 | antlr4::misc::Predicate::~Predicate() { 4 | } 5 | -------------------------------------------------------------------------------- /antlr/antlr4-cpp-runtime-4.7.2-source/runtime/src/tree/ErrorNode.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "tree/ErrorNode.h" 7 | 8 | antlr4::tree::ErrorNode::~ErrorNode() { 9 | } 10 | -------------------------------------------------------------------------------- /antlr/antlr4-cpp-runtime-4.7.2-source/runtime/src/tree/TerminalNode.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "tree/TerminalNode.h" 7 | 8 | antlr4::tree::TerminalNode::~TerminalNode() { 9 | } 10 | -------------------------------------------------------------------------------- /antlr/antlr4-cpp-runtime-4.7.2-source/runtime/src/tree/pattern/Chunk.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. 2 | * Use of this file is governed by the BSD 3-clause license that 3 | * can be found in the LICENSE.txt file in the project root. 4 | */ 5 | 6 | #include "tree/pattern/Chunk.h" 7 | 8 | antlr4::tree::pattern::Chunk::~Chunk() { 9 | } 10 | -------------------------------------------------------------------------------- /antlr/antlr4-cpp-runtime-4.7.2-source/runtime/src/tree/xpath/XPathLexer.tokens: -------------------------------------------------------------------------------- 1 | TOKEN_REF=1 2 | RULE_REF=2 3 | ANYWHERE=3 4 | ROOT=4 5 | WILDCARD=5 6 | BANG=6 7 | ID=7 8 | STRING=8 9 | '//'=3 10 | '/'=4 11 | '*'=5 12 | '!'=6 13 | -------------------------------------------------------------------------------- /antlr/compile.bat: -------------------------------------------------------------------------------- 1 | CALL antlr %1.g4 2 | CALL jvc %1*.java 3 | CALL antlr -Dlanguage=Cpp %1.g4 4 | -------------------------------------------------------------------------------- /antlr/compile.sh: -------------------------------------------------------------------------------- 1 | ./antlr.sh $1.g4 2 | ./jvc.sh $1*.java 3 | ./antlr.sh -Dlanguage=Cpp $1.g4 4 | -------------------------------------------------------------------------------- /antlr/grun.bat: -------------------------------------------------------------------------------- 1 | java -cp ".;antlr-4.7.2-complete.jar;%CLASSPATH%" org.antlr.v4.gui.TestRig %* 2 | -------------------------------------------------------------------------------- /antlr/grun.sh: -------------------------------------------------------------------------------- 1 | java -cp ".:antlr-4.7.2-complete.jar" org.antlr.v4.gui.TestRig $* 2 | -------------------------------------------------------------------------------- /antlr/jvc.bat: -------------------------------------------------------------------------------- 1 | javac -cp "antlr-4.7.2-complete.jar;%CLASSPATH%" %* 2 | -------------------------------------------------------------------------------- /antlr/jvc.sh: -------------------------------------------------------------------------------- 1 | javac -cp "antlr-4.7.2-complete.jar" $* 2 | -------------------------------------------------------------------------------- /antlr/testi.bat: -------------------------------------------------------------------------------- 1 | CALL grun silice root test1.si -tokens -gui 2 | -------------------------------------------------------------------------------- /antlr/testl.bat: -------------------------------------------------------------------------------- 1 | CALL compile lpp 2 | CALL grun lpp root test1.l -tokens -gui 3 | -------------------------------------------------------------------------------- /antlr/testv.bat: -------------------------------------------------------------------------------- 1 | CALL grun vmodule root test1.v -tokens -gui 2 | -------------------------------------------------------------------------------- /bin/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore everything in this directory 2 | * 3 | # Except this file 4 | !.gitignore 5 | -------------------------------------------------------------------------------- /frameworks/boards/bare/bare.v: -------------------------------------------------------------------------------- 1 | /* 2 | [Bare framework] Leave empty, this is used when exporting to verilog 3 | */ 4 | -------------------------------------------------------------------------------- /frameworks/libraries/riscv/ice-v/crt0.s: -------------------------------------------------------------------------------- 1 | .text 2 | .global _start 3 | .type _start, @function 4 | 5 | _start: 6 | li sp,STACK_START 7 | call main 8 | tail exit 9 | 10 | .global exit 11 | .type exit, @function 12 | exit: 13 | j exit 14 | ret 15 | -------------------------------------------------------------------------------- /frameworks/verilator/flyover_simul.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/frameworks/verilator/flyover_simul.gif -------------------------------------------------------------------------------- /frameworks/verilator/verilator_callbacks.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // declare here all callbacks visible to designs 4 | 5 | int data(int addr); 6 | void data_write(int wenable,int addr,unsigned char byte); 7 | void set_vga_resolution(int w,int h); 8 | int get_random(); 9 | void output_char(int c); 10 | -------------------------------------------------------------------------------- /install_dependencies_archlinux.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | pacman -S jdk-openjdk git gcc make cmake pkg-config glfw riscv64-linux-gnu-gcc python3 4 | -------------------------------------------------------------------------------- /install_dependencies_debian_like.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | sudo apt install default-jre default-jdk git gcc g++ make cmake pkg-config uuid uuid-dev libglfw3 libglfw3-dev gcc-riscv64-linux-gnu python3 4 | 5 | -------------------------------------------------------------------------------- /install_dependencies_fedora.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | sudo dnf install -y git gcc g++ make cmake pkg-config uuid uuid-devel java-11-openjdk-devel iverilog glfw glfw-devel gcc-riscv64-linux-gnu perl-FindBin python3 python3-pip 4 | -------------------------------------------------------------------------------- /learn-silice/Advanced.md: -------------------------------------------------------------------------------- 1 | # Advanced topics 2 | 3 | - [Notes on algorithms calls, bindings and timings](AlgoInOuts.md). 4 | - [Efficient design guidelines](Guidelines.md). 5 | - [Bit-width rules in expressions](). 6 | - [Adding a new board to the build system](../../frameworks/boards/README.md). 7 | -------------------------------------------------------------------------------- /learn-silice/blinky/Makefile: -------------------------------------------------------------------------------- 1 | 2 | .DEFAULT: $(file) 3 | silice-make.py -s $(file) -b $@ -p basic -o BUILD_$(subst :,_,$@) 4 | 5 | clean: 6 | rm -rf BUILD_* 7 | -------------------------------------------------------------------------------- /learn-silice/blinky/blinky0.si: -------------------------------------------------------------------------------- 1 | algorithm main(output uint5 leds) 2 | { 3 | leds = 5b11110; 4 | } 5 | -------------------------------------------------------------------------------- /learn-silice/blinky/blinky1.si: -------------------------------------------------------------------------------- 1 | algorithm main(output uint5 leds) 2 | { 3 | uint26 cnt = 0; 4 | 5 | while (1) { 6 | leds = cnt[21,5]; 7 | cnt = cnt + 1; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /learn-silice/classroom/soc_wave_player/board_pins.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/learn-silice/classroom/soc_wave_player/board_pins.jpg -------------------------------------------------------------------------------- /learn-silice/classroom/soc_wave_player/compile/build/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore everything in this directory 2 | * 3 | # Except this file 4 | !.gitignore 5 | -------------------------------------------------------------------------------- /learn-silice/classroom/soc_wave_player/data/img.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/learn-silice/classroom/soc_wave_player/data/img.raw -------------------------------------------------------------------------------- /learn-silice/classroom/soc_wave_player/encode_music.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ffmpeg -i $1 -acodec pcm_u8 -f u8 -filter:a "volume=0.5" -ac 1 -ar 8000 music.raw 3 | -------------------------------------------------------------------------------- /learn-silice/classroom/soc_wave_player/firmware/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | *.elf 3 | -------------------------------------------------------------------------------- /learn-silice/classroom/soc_wave_player/firmware/crt0.s: -------------------------------------------------------------------------------- 1 | .text 2 | .global _start 3 | .type _start, @function 4 | 5 | _start: 6 | li sp,0x10000 # __stacktop 7 | call main 8 | tail exit 9 | 10 | .global exit 11 | .type exit, @function 12 | exit: 13 | .word 0 14 | ret 15 | -------------------------------------------------------------------------------- /learn-silice/classroom/soc_wave_player/firmware/printf.h: -------------------------------------------------------------------------------- 1 | // @sylefeb 2022 2 | // MIT license, see LICENSE_MIT in Silice repo root 3 | // https://github.com/sylefeb/Silice/ 4 | 5 | #pragma once 6 | 7 | #include 8 | 9 | extern void (*f_putchar)(int); 10 | 11 | // everyone needs a printf! 12 | int printf(const char *fmt,...); 13 | -------------------------------------------------------------------------------- /learn-silice/classroom/soc_wave_player/screen_pins.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/learn-silice/classroom/soc_wave_player/screen_pins.jpg -------------------------------------------------------------------------------- /learn-silice/classroom/soc_wave_player/setup.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/learn-silice/classroom/soc_wave_player/setup.jpg -------------------------------------------------------------------------------- /learn-silice/figures/bind_a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/learn-silice/figures/bind_a.png -------------------------------------------------------------------------------- /learn-silice/figures/bind_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/learn-silice/figures/bind_b.png -------------------------------------------------------------------------------- /learn-silice/figures/bind_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/learn-silice/figures/bind_c.png -------------------------------------------------------------------------------- /learn-silice/figures/bind_d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/learn-silice/figures/bind_d.png -------------------------------------------------------------------------------- /learn-silice/figures/bind_timings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/learn-silice/figures/bind_timings.png -------------------------------------------------------------------------------- /learn-silice/figures/bind_timings.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/learn-silice/figures/bind_timings.pptx -------------------------------------------------------------------------------- /learn-silice/figures/blinky5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/learn-silice/figures/blinky5.gif -------------------------------------------------------------------------------- /learn-silice/figures/first_example.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/learn-silice/figures/first_example.gif -------------------------------------------------------------------------------- /learn-silice/figures/gates.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/learn-silice/figures/gates.png -------------------------------------------------------------------------------- /learn-silice/figures/gtkwave1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/learn-silice/figures/gtkwave1.jpg -------------------------------------------------------------------------------- /learn-silice/figures/mingw64_prompt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/learn-silice/figures/mingw64_prompt.png -------------------------------------------------------------------------------- /learn-silice/figures/t10.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/learn-silice/figures/t10.gif -------------------------------------------------------------------------------- /learn-silice/figures/vga_demo_frame.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/learn-silice/figures/vga_demo_frame.png -------------------------------------------------------------------------------- /learn-silice/formal/Makefile: -------------------------------------------------------------------------------- 1 | 2 | .DEFAULT: $@.si.lpp 3 | # silice-make.py -s $@.si -b verilator -p basic -o BUILD_$(subst :,_,$@) 4 | silice-make.py -s $@.si -b formal -p basic -o BUILD_$(subst :,_,$@) 5 | 6 | clean: 7 | rm -rf BUILD_* 8 | -------------------------------------------------------------------------------- /learn-silice/formal/bmc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/learn-silice/formal/bmc.png -------------------------------------------------------------------------------- /learn-silice/formal/tind.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/learn-silice/formal/tind.png -------------------------------------------------------------------------------- /learn-silice/formal/tutorial-results-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/learn-silice/formal/tutorial-results-2.png -------------------------------------------------------------------------------- /learn-silice/formal/tutorial-results.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/learn-silice/formal/tutorial-results.png -------------------------------------------------------------------------------- /learn-silice/formal/tutorial-trace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/learn-silice/formal/tutorial-trace.png -------------------------------------------------------------------------------- /learn-silice/tutorial/Makefile: -------------------------------------------------------------------------------- 1 | file ?= t1.si 2 | 3 | .DEFAULT: $(file) 4 | silice-make.py -s $(file) -b $@ -p basic -o BUILD_$(subst :,_,$@) 5 | 6 | icestick: 7 | ifeq ($(file),t14.si) 8 | silice-make.py -s $(file) -b $@ -p basic,pmod -o BUILD_icestick 9 | else 10 | silice-make.py -s $(file) -b $@ -p basic -o BUILD_icestick 11 | endif 12 | 13 | clean: 14 | rm -rf BUILD_* 15 | -------------------------------------------------------------------------------- /learn-silice/tutorial/t14.si: -------------------------------------------------------------------------------- 1 | algorithm main(output uint5 leds, inout uint8 pmod) 2 | { 3 | 4 | always { 5 | 6 | pmod.oenable[0,1] = 1; 7 | pmod.oenable[1,1] = 0; 8 | 9 | pmod.o[0,1] = pmod.i[1,1]; 10 | 11 | } 12 | 13 | } -------------------------------------------------------------------------------- /learn-silice/tutorial/t7.si: -------------------------------------------------------------------------------- 1 | unit inc(input uint8 i,output! uint8 o) 2 | { // unregistered output ^^ 3 | always { o = i + 1; } 4 | } 5 | // main unit 6 | unit main(output uint8 leds) 7 | { 8 | uint8 a(0); uint8 b(0); 9 | inc _( i <: a, o :> b ); 10 | always { 11 | a = b; 12 | } 13 | } -------------------------------------------------------------------------------- /learn-silice/tutorial/t8.si: -------------------------------------------------------------------------------- 1 | unit main(output uint8 leds) 2 | { 3 | algorithm { 4 | uint8 n = 0; // a variable 5 | __display("Hello world, from a first cycle"); 6 | ++: 7 | __display("Hello world, from a second cycle"); 8 | ++: 9 | while ( n != 8 ) { 10 | __display(" - hello world from loop iteration %d",n); 11 | n = n + 1; 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /learn-silice/tutorial/t9.si: -------------------------------------------------------------------------------- 1 | unit main(output uint8 leds) { 2 | algorithm { 3 | uint8 table[8] = {0,1,2,3,4,5,6,7}; 4 | uint8 n = 0; 5 | while (n != 8) { 6 | __display("[%d] = %d",n,table[n]); 7 | n = n + 1; 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /learn-silice/tutorial/t9_2.si: -------------------------------------------------------------------------------- 1 | unit main(output uint8 leds) { 2 | algorithm { 3 | bram uint8 table[8] = {0,1,2,3,4,5,6,7}; 4 | uint8 n = 0; 5 | table.addr = n; 6 | while (n != 8) { 7 | __display("[%d] = %d",n,table.rdata); 8 | n = n + 1; 9 | table.addr = n; 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /projects/audio_sdcard_streamer/.gitignore: -------------------------------------------------------------------------------- 1 | *.raw 2 | *.wav 3 | *.pcm 4 | -------------------------------------------------------------------------------- /projects/audio_sdcard_streamer/Makefile: -------------------------------------------------------------------------------- 1 | 2 | .DEFAULT: main.si 3 | silice-make.py -s main.si -b $@ -p basic,sdcard,audio -o BUILD_$(subst :,_,$@) $(ARGS) 4 | 5 | clean: 6 | rm -rf BUILD_* 7 | -------------------------------------------------------------------------------- /projects/audio_sdcard_streamer/configs: -------------------------------------------------------------------------------- 1 | Makefile ulx3s 2 | -------------------------------------------------------------------------------- /projects/blinky/Makefile: -------------------------------------------------------------------------------- 1 | 2 | .DEFAULT: blinky.si 3 | silice-make.py -s blinky.si -b $@ -p basic -o BUILD_$(subst :,_,$@) $(ARGS) 4 | 5 | clean: 6 | rm -rf BUILD_* 7 | -------------------------------------------------------------------------------- /projects/blinky/configs: -------------------------------------------------------------------------------- 1 | Makefile ulx3s 2 | Makefile icestick 3 | Makefile icebreaker 4 | Makefile fomu 5 | -------------------------------------------------------------------------------- /projects/bram_interface/Makefile: -------------------------------------------------------------------------------- 1 | 2 | .DEFAULT: main.si 3 | silice-make.py -s main.si -b $@ -p basic -o BUILD_$(subst :,_,$@) $(ARGS) 4 | 5 | clean: 6 | rm -rf BUILD_* 7 | -------------------------------------------------------------------------------- /projects/bram_interface/configs: -------------------------------------------------------------------------------- 1 | Makefile verilator 2 | -------------------------------------------------------------------------------- /projects/bram_wmask/Makefile: -------------------------------------------------------------------------------- 1 | 2 | .DEFAULT: main.si 3 | silice-make.py -s main.si -b $@ -p basic -o BUILD_$(subst :,_,$@) $(ARGS) 4 | 5 | clean: 6 | rm -rf BUILD_* 7 | -------------------------------------------------------------------------------- /projects/bram_wmask/configs: -------------------------------------------------------------------------------- 1 | Makefile icestick 2 | -------------------------------------------------------------------------------- /projects/buttons_and_leds/Makefile: -------------------------------------------------------------------------------- 1 | 2 | .DEFAULT: buttons_and_leds.si 3 | silice-make.py -s buttons_and_leds.si -b $@ -p basic,buttons -o BUILD_$(subst :,_,$@) $(ARGS) 4 | 5 | clean: 6 | rm -rf BUILD_* 7 | -------------------------------------------------------------------------------- /projects/buttons_and_leds/configs: -------------------------------------------------------------------------------- 1 | Makefile icebreaker 2 | -------------------------------------------------------------------------------- /projects/common/divint16.si: -------------------------------------------------------------------------------- 1 | // Sylvain Lefebvre; simple parallel division; 2019-10-09 2 | // 16 bit version; see divint.si for more info 3 | // https://github.com/sylefeb/Silice 4 | // MIT license, see LICENSE_MIT in Silice repo root 5 | 6 | $$div_width=16 7 | $include('divint_any.si') 8 | -------------------------------------------------------------------------------- /projects/common/docs/float16 float32.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/common/docs/float16 float32.pdf -------------------------------------------------------------------------------- /projects/common/ecp5_out.v: -------------------------------------------------------------------------------- 1 | 2 | module ecp5_out( 3 | input clock, 4 | output pin, 5 | input out 6 | ); 7 | 8 | OFS1P3BX out_ff(.D(out), .Q(pin), .SCLK(clock), .PD(1'b0), .SP(1'b1)); 9 | 10 | endmodule 11 | -------------------------------------------------------------------------------- /projects/common/empty.si: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/common/empty.si -------------------------------------------------------------------------------- /projects/common/ice40_half_clock.v: -------------------------------------------------------------------------------- 1 | module ice40_half_clock( 2 | input clock_in, 3 | output clock_out 4 | ); 5 | 6 | reg half; 7 | 8 | always @(posedge clock_in) begin 9 | half <= ~half; 10 | end 11 | 12 | SB_GB gb( 13 | .USER_SIGNAL_TO_GLOBAL_BUFFER(half), 14 | .GLOBAL_BUFFER_OUTPUT(clock_out) 15 | ); 16 | 17 | endmodule 18 | -------------------------------------------------------------------------------- /projects/common/ice40_warmboot.v: -------------------------------------------------------------------------------- 1 | `ifndef ICE40_WARMBOOT 2 | `define ICE40_WARMBOOT 3 | 4 | module ice40_warmboot( 5 | input boot, 6 | input [1:0] slot 7 | ); 8 | 9 | SB_WARMBOOT wb( 10 | .BOOT(boot), 11 | .S0(slot[0]), 12 | .S1(slot[1]) 13 | ); 14 | 15 | endmodule 16 | 17 | `endif 18 | -------------------------------------------------------------------------------- /projects/common/inout1_set.v: -------------------------------------------------------------------------------- 1 | module inout1_set( 2 | inout io_pin, 3 | input io_write, 4 | output io_read, 5 | input io_write_enable 6 | ); 7 | assign io_pin = io_write_enable ? io_write : 1'bZ; 8 | assign io_read = io_pin; 9 | endmodule 10 | -------------------------------------------------------------------------------- /projects/common/inout4_set.v: -------------------------------------------------------------------------------- 1 | module inout4_set( 2 | inout [3:0] io_pin, 3 | input [3:0] io_write, 4 | output [3:0] io_read, 5 | input io_write_enable 6 | ); 7 | assign io_pin = io_write_enable ? io_write : 4'hZ; 8 | assign io_read = io_pin; 9 | endmodule 10 | -------------------------------------------------------------------------------- /projects/common/mt48lc32m8a2.v: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/common/mt48lc32m8a2.v -------------------------------------------------------------------------------- /projects/common/out13_ff_ulx3s.v: -------------------------------------------------------------------------------- 1 | // TODO allow parameteric modules from Silice 2 | 3 | module out13_ff_ulx3s( 4 | input clock, 5 | output [12:0] pin, 6 | input [12:0] d 7 | ); 8 | 9 | OFS1P3BX out_ff[12:0] (.D(d), .Q(pin), .SCLK(clock), .PD(1'b0), .SP(1'b1)); 10 | 11 | endmodule 12 | -------------------------------------------------------------------------------- /projects/common/out1_ff_ulx3s.v: -------------------------------------------------------------------------------- 1 | // TODO allow parameteric modules from Silice 2 | 3 | module out1_ff_ulx3s( 4 | input clock, 5 | output pin, 6 | input d 7 | ); 8 | 9 | OFS1P3BX out_ff(.D(d), .Q(pin), .SCLK(clock), .PD(1'b0), .SP(1'b1)); 10 | 11 | endmodule 12 | -------------------------------------------------------------------------------- /projects/common/out2_ff_ulx3s.v: -------------------------------------------------------------------------------- 1 | // TODO allow parameteric modules from Silice 2 | 3 | module out2_ff_ulx3s( 4 | input clock, 5 | output [1:0] pin, 6 | input [1:0] d 7 | ); 8 | 9 | OFS1P3BX out_ff[1:0] (.D(d), .Q(pin), .SCLK(clock), .PD(1'b0), .SP(1'b1)); 10 | 11 | endmodule 12 | -------------------------------------------------------------------------------- /projects/common/passthrough.v: -------------------------------------------------------------------------------- 1 | `ifndef PASSTHROUGH 2 | `define PASSTHROUGH 3 | 4 | module passthrough( 5 | input inv, 6 | output outv); 7 | 8 | assign outv = inv; 9 | 10 | endmodule 11 | 12 | `endif 13 | -------------------------------------------------------------------------------- /projects/common/plls/simul_166.v: -------------------------------------------------------------------------------- 1 | module pll 2 | ( 3 | output clkout0 // 166 MHz 4 | ); 5 | 6 | reg clk; 7 | 8 | assign clkout0 = clk; 9 | 10 | initial begin 11 | clk = 1'b0; 12 | forever clk = #3 ~clk; 13 | end 14 | 15 | endmodule 16 | -------------------------------------------------------------------------------- /projects/common/plls/simul_200.v: -------------------------------------------------------------------------------- 1 | module pll 2 | ( 3 | output clkout0 // 200 MHz 4 | ); 5 | 6 | reg clk; 7 | 8 | assign clkout0 = clk; 9 | 10 | initial begin 11 | clk = 1'b0; 12 | forever clk = #2.5 ~clk; // generates a 200 MHz clock 13 | end 14 | 15 | endmodule 16 | -------------------------------------------------------------------------------- /projects/common/verilator_data.v: -------------------------------------------------------------------------------- 1 | // SL 2021-12-15 2 | 3 | module verilator_data( 4 | input clock, 5 | input [31:0] addr, 6 | output reg [7:0] data); 7 | 8 | always @(posedge clock) begin 9 | data <= $c32("data(",addr,")"); 10 | end 11 | 12 | endmodule 13 | -------------------------------------------------------------------------------- /projects/common/verilator_random.v: -------------------------------------------------------------------------------- 1 | // SL 2023-03-24 2 | 3 | module verilator_random( 4 | input clock, 5 | output reg [31:0] rnd); 6 | 7 | always @(posedge clock) begin 8 | rnd <= $c32("get_random()"); 9 | end 10 | 11 | endmodule 12 | -------------------------------------------------------------------------------- /projects/divint_bare/Makefile: -------------------------------------------------------------------------------- 1 | 2 | .DEFAULT: main.si 3 | silice-make.py -s main.si -b $@ -p basic -o BUILD_$(subst :,_,$@) $(ARGS) 4 | 5 | clean: 6 | rm -rf BUILD_* 7 | -------------------------------------------------------------------------------- /projects/divint_bare/configs: -------------------------------------------------------------------------------- 1 | Makefile verilator 2 | -------------------------------------------------------------------------------- /projects/divstd_bare/Makefile: -------------------------------------------------------------------------------- 1 | .DEFAULT: main.si 2 | silice-make.py -s main.si -b $@ -p basic -o BUILD_$(subst :,_,$@) $(ARGS) 3 | 4 | clean: 5 | rm -rf BUILD_* 6 | -------------------------------------------------------------------------------- /projects/divstd_bare/configs: -------------------------------------------------------------------------------- 1 | Makefile verilator 2 | -------------------------------------------------------------------------------- /projects/divstd_pipe/Makefile: -------------------------------------------------------------------------------- 1 | 2 | .DEFAULT: main.si 3 | silice-make.py -s main.si -b $@ -p basic -o BUILD_$(subst :,_,$@) $(ARGS) 4 | 5 | clean: 6 | rm -rf BUILD_* 7 | -------------------------------------------------------------------------------- /projects/divstd_pipe/configs: -------------------------------------------------------------------------------- 1 | Makefile verilator 2 | -------------------------------------------------------------------------------- /projects/doomchip/lumps/.gitignore: -------------------------------------------------------------------------------- 1 | *.lump 2 | -------------------------------------------------------------------------------- /projects/doomchip/lumps/flats/.gitignore: -------------------------------------------------------------------------------- 1 | *.lump 2 | -------------------------------------------------------------------------------- /projects/doomchip/lumps/patches/.gitignore: -------------------------------------------------------------------------------- 1 | *.lump 2 | -------------------------------------------------------------------------------- /projects/doomchip/lumps/sprites/.gitignore: -------------------------------------------------------------------------------- 1 | *.lump 2 | -------------------------------------------------------------------------------- /projects/doomchip/textures/.gitignore: -------------------------------------------------------------------------------- 1 | *.tga 2 | 3 | -------------------------------------------------------------------------------- /projects/doomchip/textures/assembled/.gitignore: -------------------------------------------------------------------------------- 1 | *.tga 2 | -------------------------------------------------------------------------------- /projects/doomchip/vga_doomchip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/doomchip/vga_doomchip.png -------------------------------------------------------------------------------- /projects/easy-riscv/Makefile: -------------------------------------------------------------------------------- 1 | 2 | .DEFAULT: main.si 3 | rm -rf BUILD_$@ 4 | silice-make.py -s main.si -b $@ -p basic -o BUILD_$(subst :,_,$@) $(ARGS) 5 | 6 | clean: 7 | rm -rf BUILD_* 8 | -------------------------------------------------------------------------------- /projects/easy-riscv/configs: -------------------------------------------------------------------------------- 1 | Makefile verilator 2 | -------------------------------------------------------------------------------- /projects/easy-riscv/on_accessed/Makefile: -------------------------------------------------------------------------------- 1 | 2 | .DEFAULT: main.si 3 | rm -rf BUILD_$@ 4 | silice-make.py -s main.si -b $@ -p basic -o BUILD_$(subst :,_,$@) $(ARGS) 5 | 6 | clean: 7 | rm -rf BUILD_* 8 | -------------------------------------------------------------------------------- /projects/easy-riscv/select_core/Makefile: -------------------------------------------------------------------------------- 1 | 2 | .DEFAULT: with_ice-v-dual.si 3 | rm -rf BUILD_$@ 4 | silice-make.py -s with_ice-v-dual.si -b $@ -p basic -o BUILD_$(subst :,_,$@) $(ARGS) 5 | 6 | clean: 7 | rm -rf BUILD_* 8 | -------------------------------------------------------------------------------- /projects/easy-riscv/uart_doomfire/Makefile: -------------------------------------------------------------------------------- 1 | 2 | .DEFAULT: main.si 3 | rm -rf BUILD_$@ 4 | silice-make.py -s main.si -b $@ -p basic,uart -o BUILD_$(subst :,_,$@) $(ARGS) 5 | 6 | clean: 7 | rm -rf BUILD_* 8 | -------------------------------------------------------------------------------- /projects/fire-v/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | *.lpp 3 | *.img 4 | -------------------------------------------------------------------------------- /projects/fire-v/Makefile.inferno: -------------------------------------------------------------------------------- 1 | 2 | .DEFAULT: inferno.si 3 | silice-make.py -s inferno.si -b $@ -p basic,sdram,hdmi,sdcard,audio -o BUILD_$(subst :,_,$@) -t shell 4 | 5 | verilator: inferno.si 6 | silice-make.py -s inferno.si -b $@ -p basic,vga,sdram -o BUILD_$(subst :,_,$@) 7 | 8 | clean: 9 | rm -rf BUILD_* 10 | -------------------------------------------------------------------------------- /projects/fire-v/bin/sdcard/cubes.img: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/fire-v/bin/sdcard/cubes.img -------------------------------------------------------------------------------- /projects/fire-v/bin/sdcard/dhrystone.img: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/fire-v/bin/sdcard/dhrystone.img -------------------------------------------------------------------------------- /projects/fire-v/bin/sdcard/leds.img: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/fire-v/bin/sdcard/leds.img -------------------------------------------------------------------------------- /projects/fire-v/bin/ulx3s/blaze-synth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/fire-v/bin/ulx3s/blaze-synth.png -------------------------------------------------------------------------------- /projects/fire-v/bin/ulx3s/blaze_200mhz.bit: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/fire-v/bin/ulx3s/blaze_200mhz.bit -------------------------------------------------------------------------------- /projects/fire-v/bin/ulx3s/wildfire-synth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/fire-v/bin/ulx3s/wildfire-synth.png -------------------------------------------------------------------------------- /projects/fire-v/bin/ulx3s/wildfire_160mhz.bit: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/fire-v/bin/ulx3s/wildfire_160mhz.bit -------------------------------------------------------------------------------- /projects/fire-v/build/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /projects/fire-v/compile_dhrystone.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ./compile_c.sh smoke/dhrystone/dhry.c 2> /dev/null 4 | -------------------------------------------------------------------------------- /projects/fire-v/compile_to_blaze.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rm build/code1.hex 2> /dev/null 4 | ./compile_c_blaze.sh $1 5 | -------------------------------------------------------------------------------- /projects/fire-v/compile_to_inferno.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ./compile_c.sh $1 0 4 | ./compile_c.sh $1 1 5 | -------------------------------------------------------------------------------- /projects/fire-v/compile_to_spark.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rm build/code0.hex 2> /dev/null 4 | ./compile_c.sh $1 --nolibc 5 | -------------------------------------------------------------------------------- /projects/fire-v/compile_to_wildfire.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rm build/code1.hex 2> /dev/null 4 | ./compile_c.sh $1 5 | -------------------------------------------------------------------------------- /projects/fire-v/configs: -------------------------------------------------------------------------------- 1 | Makefile.test ulx3s 2 | Makefile.test verilator 3 | Makefile.test icebreaker 4 | -------------------------------------------------------------------------------- /projects/fire-v/doc/edge-walk-spans.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/fire-v/doc/edge-walk-spans.png -------------------------------------------------------------------------------- /projects/fire-v/doc/figures.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/fire-v/doc/figures.pptx -------------------------------------------------------------------------------- /projects/fire-v/doc/inferno-arch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/fire-v/doc/inferno-arch.png -------------------------------------------------------------------------------- /projects/fire-v/doc/span-chunks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/fire-v/doc/span-chunks.png -------------------------------------------------------------------------------- /projects/fire-v/doc/wildfire-arch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/fire-v/doc/wildfire-arch.png -------------------------------------------------------------------------------- /projects/fire-v/export-verilog/.gitignore: -------------------------------------------------------------------------------- 1 | *.log 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /projects/fire-v/make_font.si: -------------------------------------------------------------------------------- 1 | // SL 2020-12-23 @sylefeb 2 | // MIT license, see LICENSE_MIT in Silice repo root 3 | // https://github.com/sylefeb/Silice 4 | // ------------------------- 5 | 6 | // pre-compilation script, embeds compile code within sdcard image 7 | $$dofile('pre_tga2c.lua') 8 | 9 | $$error('=======> Done! Please ignore the subsequent error messages.') 10 | -------------------------------------------------------------------------------- /projects/fire-v/smoke/config_asm.ld: -------------------------------------------------------------------------------- 1 | MEMORY 2 | { 3 | ram (rwx) : ORIGIN = 0x00000000, LENGTH = 0x00001000 4 | } 5 | 6 | ENTRY(_start) 7 | 8 | SECTIONS { 9 | .text 0x00000000 : { 10 | *(.text) 11 | } >ram 12 | } 13 | -------------------------------------------------------------------------------- /projects/fire-v/smoke/dhrystone/README.md: -------------------------------------------------------------------------------- 1 | https://github.com/cliffordwolf/picorv32/blob/master/dhrystone/ 2 | https://github.com/BrunoLevy/learn-fpga/tree/master/FemtoRV/FIRMWARE/DHRYSTONE 3 | -------------------------------------------------------------------------------- /projects/fire-v/smoke/dhrystone/dhry.c: -------------------------------------------------------------------------------- 1 | #define RISCV 2 | #define TIME 3 | #define USE_MYSTDLIB 4 | 5 | void set_draw_buffer(char); 6 | 7 | #include "dhry_1.c" 8 | #include "dhry_2.c" 9 | -------------------------------------------------------------------------------- /projects/fire-v/smoke/tests/README.md: -------------------------------------------------------------------------------- 1 | - Voices produced with https://text-to-speech-demo.ng.bluemix.net/ 2 | 3 | - For the xmas demo I recommend [Scott Holmes -- This is Christmas](https://freemusicarchive.org/genre/Christmas) I did commit a silent file placeholder in the repository (slience.wav). 4 | -------------------------------------------------------------------------------- /projects/fire-v/smoke/tests/add.c: -------------------------------------------------------------------------------- 1 | // MIT license, see LICENSE_MIT in Silice repo root 2 | // @sylefeb 2020 3 | // https://github.com/sylefeb/Silice 4 | 5 | int f(int v) { 6 | return v + 10; 7 | } 8 | 9 | void main() 10 | { 11 | for (int i = 0; i < 10 ; i ++) { 12 | *(int*)0x20000000 = i; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /projects/fire-v/smoke/tests/come_on.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/fire-v/smoke/tests/come_on.raw -------------------------------------------------------------------------------- /projects/fire-v/smoke/tests/cpu0.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/fire-v/smoke/tests/cpu0.raw -------------------------------------------------------------------------------- /projects/fire-v/smoke/tests/cpu1.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/fire-v/smoke/tests/cpu1.raw -------------------------------------------------------------------------------- /projects/fire-v/smoke/tests/friend.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/fire-v/smoke/tests/friend.raw -------------------------------------------------------------------------------- /projects/fire-v/smoke/tests/gold.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/fire-v/smoke/tests/gold.tga -------------------------------------------------------------------------------- /projects/fire-v/smoke/tests/he_is_right.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/fire-v/smoke/tests/he_is_right.raw -------------------------------------------------------------------------------- /projects/fire-v/smoke/tests/hi_sorry.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/fire-v/smoke/tests/hi_sorry.raw -------------------------------------------------------------------------------- /projects/fire-v/smoke/tests/left.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/fire-v/smoke/tests/left.raw -------------------------------------------------------------------------------- /projects/fire-v/smoke/tests/right.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/fire-v/smoke/tests/right.raw -------------------------------------------------------------------------------- /projects/fire-v/smoke/tests/silence.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/fire-v/smoke/tests/silence.raw -------------------------------------------------------------------------------- /projects/fire-v/smoke/tests/speak_l.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/fire-v/smoke/tests/speak_l.raw -------------------------------------------------------------------------------- /projects/fire-v/smoke/tests/speak_r.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/fire-v/smoke/tests/speak_r.raw -------------------------------------------------------------------------------- /projects/fire-v/smoke/tests/test3.s: -------------------------------------------------------------------------------- 1 | .equ Leds, 0x400 2 | 3 | .globl _start 4 | 5 | _start: 6 | 7 | addi t0, zero, 0x3 8 | sw t0, Leds(zero) 9 | -------------------------------------------------------------------------------- /projects/fire-v/smoke/tests/text.c: -------------------------------------------------------------------------------- 1 | // @sylefeb 2020 2 | // https://github.com/sylefeb/Silice 3 | // MIT license, see LICENSE_MIT in Silice repo root 4 | 5 | #include "../mylibc/mylibc.h" 6 | 7 | void main() 8 | { 9 | 10 | if (cpuid()) { 11 | printf("\n\n"); 12 | } 13 | printf("Hello how are you? (cpu ID:%d)",cpuid()); 14 | 15 | } 16 | -------------------------------------------------------------------------------- /projects/fire-v/smoke/tests/xmas1.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/fire-v/smoke/tests/xmas1.raw -------------------------------------------------------------------------------- /projects/fire-v/smoke/tests/xmas2.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/fire-v/smoke/tests/xmas2.raw -------------------------------------------------------------------------------- /projects/fire-v/smoke/tests/xmas_bkg.rawraw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/fire-v/smoke/tests/xmas_bkg.rawraw -------------------------------------------------------------------------------- /projects/flashbang/README.md: -------------------------------------------------------------------------------- 1 | # Flash utility 2 | 3 | Simple RV32I core with SPIflash and UART, for debugging purposes. 4 | -------------------------------------------------------------------------------- /projects/flashbang/compile.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | export DIR=`pwd` 3 | echo $DIR 4 | rm build/code*.hex 5 | pushd . 6 | cd ../fire-v/ 7 | rm build/code*.hex 8 | ./compile_to_spark.sh $DIR/firmware.c 9 | # ./compile_to_spark.sh smoke/tests/leds.c 10 | cp build/code*.hex $DIR/build/ 11 | popd 12 | -------------------------------------------------------------------------------- /projects/gallery.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/gallery.png -------------------------------------------------------------------------------- /projects/hdmi_test/Makefile: -------------------------------------------------------------------------------- 1 | 2 | .DEFAULT: hdmi_test.si 3 | silice-make.py -s hdmi_test.si -b $@ -p basic,hdmi -DCLOCK_25MHz=1 -o BUILD_$(subst :,_,$@) $(ARGS) 4 | 5 | clean: 6 | rm -rf BUILD_* 7 | -------------------------------------------------------------------------------- /projects/hdmi_test/hdmi_test.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/hdmi_test/hdmi_test.jpg -------------------------------------------------------------------------------- /projects/i2s_audio/Makefile: -------------------------------------------------------------------------------- 1 | 2 | .DEFAULT: main.si 3 | silice-make.py -s main.si -b $@ -p basic,pmod -o BUILD_$(subst :,_,$@) $(ARGS) 4 | 5 | verilator: main.si 6 | silice-make.py -s main.si -b $@ -p basic -o BUILD_$(subst :,_,$@) $(ARGS) 7 | 8 | clean: 9 | rm -rf BUILD_* 10 | -------------------------------------------------------------------------------- /projects/i2s_audio/audio_pcm.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/i2s_audio/audio_pcm.jpg -------------------------------------------------------------------------------- /projects/ice-v/Makefile.cmp: -------------------------------------------------------------------------------- 1 | 2 | verilator: SOCs/ice-v-soc.si 3 | silice-make.py -s SOCs/ice-v-soc-cmp.si -b $@ -p basic -o BUILD_$(subst :,_,$@) $(ARGS) 4 | 5 | clean: 6 | rm -rf BUILD_* 7 | rm -f crt0.o 8 | rm -f SOCs/*.lpp 9 | -------------------------------------------------------------------------------- /projects/ice-v/Makefile.conveyor: -------------------------------------------------------------------------------- 1 | 2 | .DEFAULT: SOCs/ice-v-soc-conveyor.si 3 | silice-make.py -s SOCs/ice-v-soc-conveyor.si -b $@ -p basic,oled -o BUILD_$(subst :,_,$@) $(ARGS) 4 | 5 | clean: 6 | rm -rf BUILD_* 7 | -------------------------------------------------------------------------------- /projects/ice-v/Makefile.oled: -------------------------------------------------------------------------------- 1 | 2 | .DEFAULT: SOCs/ice-v-soc.si 3 | silice-make.py -s SOCs/ice-v-soc.si -b $@ -p basic,oled -o BUILD_$(subst :,_,$@) $(ARGS) 4 | 5 | clean: 6 | rm -rf BUILD_* 7 | -------------------------------------------------------------------------------- /projects/ice-v/Makefile.pmod: -------------------------------------------------------------------------------- 1 | 2 | .DEFAULT: SOCs/ice-v-soc.si 3 | silice-make.py -s SOCs/ice-v-soc.si -b $@ -p basic,pmod,spiflash -o BUILD_$(subst :,_,$@) $(ARGS) 4 | 5 | clean: 6 | rm -rf BUILD_* 7 | -------------------------------------------------------------------------------- /projects/ice-v/Makefile.swirl: -------------------------------------------------------------------------------- 1 | 2 | .DEFAULT: SOCs/ice-v-soc-swirl.si 3 | silice-make.py -s SOCs/ice-v-soc-swirl.si -b $@ -p basic,oled -o BUILD_$(subst :,_,$@) $(ARGS) 4 | 5 | clean: 6 | rm -rf BUILD_* 7 | -------------------------------------------------------------------------------- /projects/ice-v/SOCs/ice-v-soc-cmp.si.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | // SL 2022-05-13 3 | 4 | void cpu_retires(int id,unsigned int pc,unsigned int instr,unsigned int rd,unsigned int val); 5 | int cpu_reinstr(int id); 6 | void cpu_putc(int id,int c); -------------------------------------------------------------------------------- /projects/ice-v/compile/build/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /projects/ice-v/compile/cmp/crt0.s: -------------------------------------------------------------------------------- 1 | .text 2 | .global _start 3 | .type _start, @function 4 | 5 | _start: 6 | li sp,0x7e00 # end of RAM 7 | # init done 8 | call main # let's roll! (core1) 9 | tail exit 10 | 11 | .global exit 12 | .type exit, @function 13 | exit: 14 | j exit 15 | ret 16 | -------------------------------------------------------------------------------- /projects/ice-v/compile/cmp/test.c: -------------------------------------------------------------------------------- 1 | #include "mylibc.h" 2 | 3 | void main() 4 | { 5 | /* 6 | int i = 0; 7 | while (1) { 8 | i++; 9 | printf("i = %d\n",i); 10 | } 11 | */ 12 | volatile int *ptr = (volatile int *)0x20000; 13 | printf("v = %x\n",*ptr); 14 | } 15 | -------------------------------------------------------------------------------- /projects/ice-v/compile/icebreaker/conveyor/crt0.s: -------------------------------------------------------------------------------- 1 | .text 2 | .global _start 3 | .type _start, @function 4 | 5 | _start: 6 | li sp,0x1800 # end of RAM 7 | # init done 8 | call main # let's roll! (core1) 9 | tail exit 10 | 11 | .global exit 12 | .type exit, @function 13 | exit: 14 | j exit 15 | ret 16 | -------------------------------------------------------------------------------- /projects/ice-v/compile/icebreaker/ice-v/crt0.s: -------------------------------------------------------------------------------- 1 | .text 2 | .global _start 3 | .type _start, @function 4 | 5 | _start: 6 | li sp,0x1800 7 | call main 8 | tail exit 9 | 10 | .global exit 11 | .type exit, @function 12 | exit: 13 | .word 0 14 | ret 15 | -------------------------------------------------------------------------------- /projects/ice-v/compile/icebreaker/swirl-cache/crt0.s: -------------------------------------------------------------------------------- 1 | .text 2 | .global _start 3 | .type _start, @function 4 | 5 | _start: 6 | li sp,0x100000 # end of RAM 7 | # init done 8 | call main # let's roll! (core1) 9 | tail exit 10 | 11 | .global exit 12 | .type exit, @function 13 | exit: 14 | j exit 15 | ret 16 | -------------------------------------------------------------------------------- /projects/ice-v/compile/icebreaker/swirl/crt0.s: -------------------------------------------------------------------------------- 1 | .text 2 | .global _start 3 | .type _start, @function 4 | 5 | _start: 6 | li sp,0x1800 # end of RAM 7 | # init done 8 | call main # let's roll! (core1) 9 | tail exit 10 | 11 | .global exit 12 | .type exit, @function 13 | exit: 14 | j exit 15 | ret 16 | -------------------------------------------------------------------------------- /projects/ice-v/compile/icestick/conveyor/crt0.s: -------------------------------------------------------------------------------- 1 | .text 2 | .global _start 3 | .type _start, @function 4 | 5 | _start: 6 | li sp,0x1800 # end of RAM 7 | # init done 8 | call main # let's roll! (core1) 9 | tail exit 10 | 11 | .global exit 12 | .type exit, @function 13 | exit: 14 | j exit 15 | ret 16 | -------------------------------------------------------------------------------- /projects/ice-v/compile/icestick/ice-v/config_asm.ld: -------------------------------------------------------------------------------- 1 | MEMORY 2 | { 3 | ram (rwx) : ORIGIN = 0x00000000, LENGTH = 0x00001000 4 | } 5 | 6 | ENTRY(_start) 7 | 8 | SECTIONS { 9 | .text 0x00000000 : { 10 | *(.text) 11 | } >ram 12 | } 13 | -------------------------------------------------------------------------------- /projects/ice-v/compile/icestick/ice-v/crt0.s: -------------------------------------------------------------------------------- 1 | .text 2 | .global _start 3 | .type _start, @function 4 | 5 | _start: 6 | li sp,0x1800 7 | call main 8 | tail exit 9 | 10 | .global exit 11 | .type exit, @function 12 | exit: 13 | .word 0 14 | ret 15 | -------------------------------------------------------------------------------- /projects/ice-v/configs: -------------------------------------------------------------------------------- 1 | Makefile.test icebreaker 2 | Makefile.test icestick 3 | Makefile.test icestick2 4 | Makefile.test icestick3 5 | Makefile.test icebreaker2 6 | -------------------------------------------------------------------------------- /projects/ice-v/ice-v-98.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/ice-v/ice-v-98.png -------------------------------------------------------------------------------- /projects/ice-v/ice-v-doom-fire.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/ice-v/ice-v-doom-fire.png -------------------------------------------------------------------------------- /projects/ice-v/ice-v-dual-120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/ice-v/ice-v-dual-120.png -------------------------------------------------------------------------------- /projects/ice-v/ice-v-dual-demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/ice-v/ice-v-dual-demo.png -------------------------------------------------------------------------------- /projects/ice-v/ice-v-fermata-tunnel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/ice-v/ice-v-fermata-tunnel.png -------------------------------------------------------------------------------- /projects/ice-v/icebreaker-creset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/ice-v/icebreaker-creset.png -------------------------------------------------------------------------------- /projects/ice-v/oled-pmod-4wires.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/ice-v/oled-pmod-4wires.jpg -------------------------------------------------------------------------------- /projects/ice-v/src/floats.c: -------------------------------------------------------------------------------- 1 | #include "config.h" 2 | #include 3 | 4 | void main() 5 | { 6 | float f = 1.111111f; 7 | for (int i = 0 ; i < 20 ; ++i) { 8 | f = f * f; 9 | *LEDS = (int)round(f); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /projects/ice-v/src/icebreaker-fermata/config.h: -------------------------------------------------------------------------------- 1 | // MIT license, see LICENSE_MIT in Silice repo root 2 | // @sylefeb 2020 3 | #pragma once 4 | 5 | volatile int* const LEDS = (int*)0x200004; 6 | -------------------------------------------------------------------------------- /projects/ice-v/src/icebreaker-swirl-cache/config.h: -------------------------------------------------------------------------------- 1 | // MIT license, see LICENSE_MIT in Silice repo root 2 | // @sylefeb 2020 3 | #pragma once 4 | 5 | volatile int* const LEDS = (int*)0x4000004; 6 | volatile int* const UART = (int*)0x4000008; 7 | -------------------------------------------------------------------------------- /projects/ice-v/src/icebreaker-swirl/config.h: -------------------------------------------------------------------------------- 1 | // MIT license, see LICENSE_MIT in Silice repo root 2 | // @sylefeb 2020 3 | #pragma once 4 | 5 | volatile int* const LEDS = (int*)0x2004; 6 | volatile int* const OLED = (int*)0x2008; 7 | volatile int* const OLED_RST = (int*)0x2010; 8 | volatile int* const SOUND = (int*)0x2020; 9 | volatile int* const SPIFLASH = (int*)0x2040; 10 | -------------------------------------------------------------------------------- /projects/ice-v/src/icebreaker/config.h: -------------------------------------------------------------------------------- 1 | // MIT license, see LICENSE_MIT in Silice repo root 2 | // @sylefeb 2020 3 | #pragma once 4 | 5 | volatile int* const LEDS = (int*)0x80004; 6 | volatile int* const OLED = (int*)0x80008; 7 | volatile int* const OLED_RST = (int*)0x80010; 8 | volatile int* const SOUND = (int*)0x80020; 9 | volatile int* const SPIFLASH = (int*)0x80040; 10 | -------------------------------------------------------------------------------- /projects/ice-v/src/icestick-ram/config.h: -------------------------------------------------------------------------------- 1 | // MIT license, see LICENSE_MIT in Silice repo root 2 | // @sylefeb 2020 3 | #pragma once 4 | 5 | volatile int* const LEDS = (int*)0x2000004; 6 | volatile int* const FASTRAM = (int*)0x3800000; 7 | -------------------------------------------------------------------------------- /projects/ice-v/src/icestick/config.h: -------------------------------------------------------------------------------- 1 | // MIT license, see LICENSE_MIT in Silice repo root 2 | // @sylefeb 2020 3 | #pragma once 4 | 5 | volatile int* const LEDS = (int*)0x2004; 6 | volatile int* const OLED = (int*)0x2008; 7 | volatile int* const OLED_RST = (int*)0x2010; 8 | volatile int* const SOUND = (int*)0x2020; 9 | volatile int* const SPIFLASH = (int*)0x2040; 10 | -------------------------------------------------------------------------------- /projects/ice-v/src/icestick/test3.s: -------------------------------------------------------------------------------- 1 | .equ Leds, 0x400 2 | 3 | .globl _start 4 | 5 | _start: 6 | 7 | addi t0, zero, 0x3 8 | sw t0, Leds(zero) 9 | -------------------------------------------------------------------------------- /projects/ice-v/src/icestick/test5.s: -------------------------------------------------------------------------------- 1 | .globl _start 2 | 3 | _start: 4 | 5 | rdcycle t3 6 | beq t3,zero,4 7 | addi t0, zero, 33 8 | slli t2, t0, 19 9 | srli t0, t2, 19 10 | j 0x18 11 | -------------------------------------------------------------------------------- /projects/ice-v/src/printf.h: -------------------------------------------------------------------------------- 1 | // @sylefeb 2022 2 | // MIT license, see LICENSE_MIT in Silice repo root 3 | // https://github.com/sylefeb/Silice/ 4 | 5 | #pragma once 6 | 7 | #include 8 | 9 | // everyone needs a printf! 10 | int printf(const char *fmt,...); 11 | -------------------------------------------------------------------------------- /projects/ice-v/src/test_call.c: -------------------------------------------------------------------------------- 1 | // MIT license, see LICENSE_MIT in Silice repo root 2 | // @sylefeb 2021 3 | // https://github.com/sylefeb/Silice 4 | 5 | #include "config.h" 6 | 7 | void leds(unsigned char l) 8 | { 9 | *(LEDS) = l; 10 | } 11 | 12 | void main() 13 | { 14 | 15 | leds(3); 16 | leds(10); 17 | leds(3); 18 | leds(10); 19 | 20 | } 21 | -------------------------------------------------------------------------------- /projects/ice-v/src/test_composite_mem.c: -------------------------------------------------------------------------------- 1 | // MIT license, see LICENSE_MIT in Silice repo root 2 | // @sylefeb 2021 3 | // https://github.com/sylefeb/Silice 4 | 5 | #include "config.h" 6 | 7 | volatile int* const ROM = (int*)0x100000; 8 | 9 | void main() 10 | { 11 | *LEDS = 0x0f; 12 | *ROM = 0x123456; 13 | 14 | while (1) {} 15 | } 16 | -------------------------------------------------------------------------------- /projects/ice-v/src/test_oled.c: -------------------------------------------------------------------------------- 1 | // MIT license, see LICENSE_MIT in Silice repo root 2 | // @sylefeb 2021 3 | // https://github.com/sylefeb/Silice 4 | 5 | #include "oled.h" 6 | 7 | void main() 8 | { 9 | oled_init(); 10 | oled_fullscreen(); 11 | int b = 0; 12 | while (1) { 13 | b+=7; 14 | oled_clear(b); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /projects/ice-v/src/test_pip.s: -------------------------------------------------------------------------------- 1 | .globl _start 2 | 3 | _start: 4 | 5 | addi t0,zero,0 6 | 7 | addi t1,t0,1 8 | addi t2,t1,1 9 | addi t3,t2,1 10 | addi t4,t3,1 11 | addi t5,t4,1 12 | addi t6,t5,1 13 | 14 | _end: 15 | jal _end 16 | -------------------------------------------------------------------------------- /projects/ice40-dynboot/bin/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /projects/ice40-dynboot/bin/header.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/ice40-dynboot/bin/header.bin -------------------------------------------------------------------------------- /projects/ice40-dynboot/bin/package.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/ice40-dynboot/bin/package.bin -------------------------------------------------------------------------------- /projects/ice40-dynboot/bram_fill/Makefile: -------------------------------------------------------------------------------- 1 | 2 | icebreaker: bram_fill.si 3 | silice-make.py --no_program -s bram_fill.si -b $@ -p basic,buttons -o BUILD_$(subst :,_,$@) 4 | cp BUILD_icebreaker/build.bin ../bin/bram_fill.bin 5 | 6 | clean: 7 | rm -rf BUILD_* 8 | -------------------------------------------------------------------------------- /projects/ice40-dynboot/bram_show/Makefile: -------------------------------------------------------------------------------- 1 | 2 | icebreaker: bram_show.si 3 | silice-make.py --no_program -s bram_show.si -b $@ -p basic,buttons -o BUILD_$(subst :,_,$@) 4 | cp BUILD_icebreaker/build.bin ../bin/bram_show.bin 5 | 6 | clean: 7 | rm -rf BUILD_* 8 | -------------------------------------------------------------------------------- /projects/ice40-dynboot/build/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /projects/ice40-dynboot/compile.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | export DIR=`pwd` 3 | echo $DIR 4 | rm build/code*.hex 5 | pushd . 6 | cd ../fire-v/ 7 | rm build/code*.hex 8 | ./compile_to_spark.sh $DIR/firmware.c 9 | # ./compile_to_spark.sh smoke/tests/leds.c 10 | cp build/code*.hex $DIR/build/ 11 | popd 12 | -------------------------------------------------------------------------------- /projects/ice40-dynboot/header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/ice40-dynboot/header.png -------------------------------------------------------------------------------- /projects/ice40-dynboot/spram_fill/Makefile: -------------------------------------------------------------------------------- 1 | 2 | icebreaker: spram_fill.si 3 | silice-make.py --no_program -s spram_fill.si -b $@ -p basic,buttons -o BUILD_$(subst :,_,$@) 4 | cp BUILD_icebreaker/build.bin ../bin/spram_fill.bin 5 | 6 | clean: 7 | rm -rf BUILD_* 8 | -------------------------------------------------------------------------------- /projects/ice40-dynboot/spram_show/Makefile: -------------------------------------------------------------------------------- 1 | 2 | icebreaker: spram_show.si 3 | silice-make.py --no_program -s spram_show.si -b $@ -p basic,buttons -o BUILD_$(subst :,_,$@) 4 | cp BUILD_icebreaker/build.bin ../bin/spram_show.bin 5 | 6 | clean: 7 | rm -rf BUILD_* 8 | -------------------------------------------------------------------------------- /projects/ice40-dynboot/try.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | iceprog -o 1M bin/header.bin 3 | iceprog bin/package.bin 4 | -------------------------------------------------------------------------------- /projects/ice40-warmboot/bin/multi.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/ice40-warmboot/bin/multi.bin -------------------------------------------------------------------------------- /projects/inout/Makefile: -------------------------------------------------------------------------------- 1 | 2 | .DEFAULT: inout.si 3 | silice-make.py -s inout.si -b $@ -p basic,pmod -o BUILD_$(subst :,_,$@) $(ARGS) 4 | 5 | clean: 6 | rm -rf BUILD_* 7 | -------------------------------------------------------------------------------- /projects/kbfcrabe/bridge_closeup_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/kbfcrabe/bridge_closeup_1.jpg -------------------------------------------------------------------------------- /projects/kbfcrabe/bridge_closeup_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/kbfcrabe/bridge_closeup_2.jpg -------------------------------------------------------------------------------- /projects/kbfcrabe/doom-fire.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/kbfcrabe/doom-fire.jpg -------------------------------------------------------------------------------- /projects/kbfcrabe/enable_ready.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/kbfcrabe/enable_ready.png -------------------------------------------------------------------------------- /projects/kbfcrabe/kbfcrabe_side.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/kbfcrabe/kbfcrabe_side.jpg -------------------------------------------------------------------------------- /projects/kbfcrabe/orangecrab_pins.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/kbfcrabe/orangecrab_pins.jpg -------------------------------------------------------------------------------- /projects/lcd_test/Makefile: -------------------------------------------------------------------------------- 1 | .DEFAULT: main.si 2 | silice-make.py -s main.si -b $@ -p basic,pmod_out -o BUILD_$(subst :,_,$@) $(ARGS) 3 | 4 | clean: 5 | rm -rf BUILD_* 6 | -------------------------------------------------------------------------------- /projects/lcd_test/Makefile.simulation: -------------------------------------------------------------------------------- 1 | .DEFAULT: main.si 2 | silice-make.py -s main.si -b $@ -p basic -o BUILD_$(subst :,_,$@) $(ARGS) 3 | 4 | clean: 5 | rm -rf BUILD_* 6 | -------------------------------------------------------------------------------- /projects/lcd_test/hello-silice.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/lcd_test/hello-silice.jpg -------------------------------------------------------------------------------- /projects/lcd_test/ice40-schematic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/lcd_test/ice40-schematic.png -------------------------------------------------------------------------------- /projects/mulint_bare/Makefile: -------------------------------------------------------------------------------- 1 | 2 | .DEFAULT: main.si 3 | silice-make.py -s main.si -b $@ -p basic -o BUILD_$(subst :,_,$@) $(ARGS) 4 | 5 | clean: 6 | rm -rf BUILD_* 7 | -------------------------------------------------------------------------------- /projects/mulint_bare/configs: -------------------------------------------------------------------------------- 1 | Makefile verilator 2 | -------------------------------------------------------------------------------- /projects/mulint_pipe_bare/Makefile: -------------------------------------------------------------------------------- 1 | 2 | .DEFAULT: main.si 3 | silice-make.py -s main.si -b $@ -p basic -o BUILD_$(subst :,_,$@) $(ARGS) 4 | 5 | clean: 6 | rm -rf BUILD_* 7 | -------------------------------------------------------------------------------- /projects/mulint_pipe_bare/configs: -------------------------------------------------------------------------------- 1 | Makefile verilator 2 | -------------------------------------------------------------------------------- /projects/neopixel/Makefile: -------------------------------------------------------------------------------- 1 | 2 | .DEFAULT: main.si 3 | rm -rf BUILD_$@ 4 | silice-make.py -s main.si -b $@ -p basic,pmod -o BUILD_$(subst :,_,$@) $(ARGS) 5 | 6 | verilator: main.si 7 | rm -rf BUILD_$@ 8 | silice-make.py -s main.si -b $@ -p basic -o BUILD_$(subst :,_,$@) $(ARGS) 9 | 10 | clean: 11 | rm -rf BUILD_* 12 | -------------------------------------------------------------------------------- /projects/oled_sdcard_test/Makefile: -------------------------------------------------------------------------------- 1 | 2 | .DEFAULT: oled_sdcard_test.si 3 | silice-make.py -s oled_sdcard_test.si -b $@ -p basic,oled,sdcard,buttons -o BUILD_$(subst :,_,$@) $(ARGS) 4 | 5 | clean: 6 | rm -rf BUILD_* 7 | -------------------------------------------------------------------------------- /projects/oled_sdcard_test/Makefile.imgview: -------------------------------------------------------------------------------- 1 | 2 | .DEFAULT: oled_sdcard_imgview.si 3 | silice-make.py -s oled_sdcard_imgview.si -b $@ -p basic,oled,sdcard -o BUILD_$(subst :,_,$@) $(ARGS) 4 | 5 | clean: 6 | rm -rf BUILD_* 7 | -------------------------------------------------------------------------------- /projects/oled_sdcard_test/configs: -------------------------------------------------------------------------------- 1 | Makefile ulx3s 2 | Makefile.imgview ulx3s 3 | -------------------------------------------------------------------------------- /projects/oled_sdcard_test/oled_imgview.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/oled_sdcard_test/oled_imgview.jpg -------------------------------------------------------------------------------- /projects/oled_sdcard_test/test.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/oled_sdcard_test/test.tga -------------------------------------------------------------------------------- /projects/oled_test/configs: -------------------------------------------------------------------------------- 1 | Makefile ulx3s 2 | -------------------------------------------------------------------------------- /projects/oled_text/Makefile: -------------------------------------------------------------------------------- 1 | 2 | .DEFAULT: oled_text.si 3 | silice-make.py -s oled_text.si -b $@ -p basic,oled -o BUILD_$(subst :,_,$@) $(ARGS) 4 | 5 | clean: 6 | rm -rf BUILD_* 7 | -------------------------------------------------------------------------------- /projects/oled_text/configs: -------------------------------------------------------------------------------- 1 | Makefile ulx3s 2 | -------------------------------------------------------------------------------- /projects/pipeline_sort/Makefile: -------------------------------------------------------------------------------- 1 | 2 | .DEFAULT: main.si 3 | silice-make.py -s main.si -b $@ -p basic -o BUILD_$(subst :,_,$@) $(ARGS) 4 | 5 | clean: 6 | rm -rf BUILD_* 7 | -------------------------------------------------------------------------------- /projects/pipeline_sort/configs: -------------------------------------------------------------------------------- 1 | Makefile verilator 2 | -------------------------------------------------------------------------------- /projects/pipeline_sort/pipeline_sort.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/pipeline_sort/pipeline_sort.jpg -------------------------------------------------------------------------------- /projects/qpsram/bitstreams/ecpix5.bit: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/qpsram/bitstreams/ecpix5.bit -------------------------------------------------------------------------------- /projects/qpsram/bitstreams/icebreaker.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/qpsram/bitstreams/icebreaker.bin -------------------------------------------------------------------------------- /projects/qpsram/bitstreams/icestick.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/qpsram/bitstreams/icestick.bin -------------------------------------------------------------------------------- /projects/qpsram/bitstreams/ulx3s.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/qpsram/bitstreams/ulx3s.bin -------------------------------------------------------------------------------- /projects/qpsram/ecpix5_qqspi.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/qpsram/ecpix5_qqspi.jpg -------------------------------------------------------------------------------- /projects/qpsram/example.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/qpsram/example.jpg -------------------------------------------------------------------------------- /projects/qpsram/export/export.si: -------------------------------------------------------------------------------- 1 | // we indicate that we want the controller synthesized for the IceStick 2 | // this is normally done by the framework, but for export we use 3 | // the empty 'bare' framework 4 | $$ICESTICK = 1 5 | $$ICE40 = 1 6 | // we include the controller 7 | $include('../../common/qpsram2x.si') 8 | -------------------------------------------------------------------------------- /projects/qpsram/icebreaker_qqspi.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/qpsram/icebreaker_qqspi.jpg -------------------------------------------------------------------------------- /projects/qpsram/icestick_qqspi.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/qpsram/icestick_qqspi.jpg -------------------------------------------------------------------------------- /projects/qpsram/ulx3s_qqspi.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/qpsram/ulx3s_qqspi.jpg -------------------------------------------------------------------------------- /projects/rsqrt/Makefile: -------------------------------------------------------------------------------- 1 | 2 | .DEFAULT: main.si 3 | silice-make.py -s main.si -b $@ -p basic -o BUILD_$(subst :,_,$@) $(ARGS) 4 | 5 | clean: 6 | rm -rf BUILD_* 7 | -------------------------------------------------------------------------------- /projects/sdram_memtest/Makefile: -------------------------------------------------------------------------------- 1 | 2 | .DEFAULT: sdram_memtest.si 3 | silice-make.py -s sdram_memtest.si -b $@ -p basic,sdram -o BUILD_$(subst :,_,$@) $(ARGS) 4 | 5 | icarus: sdram_memtest.si 6 | silice-make.py -s sdram_memtest.si -b $@ -p basic -o BUILD_$(subst :,_,$@) 7 | 8 | clean: 9 | rm -rf BUILD_* 10 | -------------------------------------------------------------------------------- /projects/sdram_memtest/configs: -------------------------------------------------------------------------------- 1 | Makefile ulx3s 2 | -------------------------------------------------------------------------------- /projects/sdram_test/Makefile: -------------------------------------------------------------------------------- 1 | 2 | .DEFAULT: sdram_test.si 3 | silice-make.py -s sdram_test.si -b $@ -p basic,sdram -o BUILD_$(subst :,_,$@) $(ARGS) 4 | 5 | icarus: sdram_test.si 6 | silice-make.py -s sdram_test.si -b $@ -p basic -o BUILD_$(subst :,_,$@) $(ARGS) 7 | 8 | clean: 9 | rm -rf BUILD_* 10 | -------------------------------------------------------------------------------- /projects/sdram_test/configs: -------------------------------------------------------------------------------- 1 | Makefile verilator 2 | -------------------------------------------------------------------------------- /projects/spiflash/Makefile.exit_qspi: -------------------------------------------------------------------------------- 1 | 2 | .DEFAULT: exit_qspi.si 3 | silice-make.py -s exit_qspi.si -b $@ -p basic,qspiflash,uart -o BUILD_$(subst :,_,$@) $(ARGS) 4 | 5 | icarus: exit_qspi.si 6 | mkdir -p BUILD_$(subst :,_,$@) 7 | cp W25Q128JVxIM/*.TXT BUILD_$(subst :,_,$@)/ 8 | silice-make.py -s exit_qspi.si -b icarus -p basic -o BUILD_$(subst :,_,$@) $(ARGS) 9 | -------------------------------------------------------------------------------- /projects/spiflash/Makefile.test: -------------------------------------------------------------------------------- 1 | 2 | icebreaker: stream.si 3 | silice-make.py -s stream.si -b $@ -p basic,qspiflash,uart -o BUILD_$(subst :,_,$@) $(ARGS) 4 | 5 | clean: 6 | rm -rf BUILD_* 7 | -------------------------------------------------------------------------------- /projects/spiflash/W25Q128JVxIM/MEM.TXT: -------------------------------------------------------------------------------- 1 | @00000000 2 | F3 27 00 C0 93 F7 17 00 63 9E 07 00 37 01 01 00 a0 a1 a2 a3 7E AA 99 7E 51 00 01 05 92 00 21 62 02 B3 82 00 00 72 01 50 11 3 | -------------------------------------------------------------------------------- /projects/spiflash/W25Q128JVxIM/SREG.TXT: -------------------------------------------------------------------------------- 1 | /* Contents of Memory Array starting from address 0. This is a standard Verilog readmemh format. */ 2 | 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0 -------------------------------------------------------------------------------- /projects/spiflash/bitstreams/ulx3s_exit_qspi.bit: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/spiflash/bitstreams/ulx3s_exit_qspi.bit -------------------------------------------------------------------------------- /projects/spiflash/configs: -------------------------------------------------------------------------------- 1 | Makefile.test icebreaker 2 | -------------------------------------------------------------------------------- /projects/spiflash/simul_spiflash_m.v: -------------------------------------------------------------------------------- 1 | module simul_spiflash( 2 | input CSn, 3 | input CLK, 4 | inout IO0, 5 | inout IO1, 6 | inout IO2, 7 | inout IO3 8 | ); 9 | 10 | MX25R1635F simulator( 11 | .SCLK(CLK), 12 | .CS (CSn), 13 | .SI (IO0), 14 | .SO (IO1), 15 | .WP (IO2), 16 | .SIO3(IO3) 17 | ); 18 | 19 | endmodule 20 | -------------------------------------------------------------------------------- /projects/spiflash/simul_spiflash_w.v: -------------------------------------------------------------------------------- 1 | module simul_spiflash( 2 | input CSn, 3 | input CLK, 4 | inout IO0, 5 | inout IO1, 6 | inout IO2, 7 | inout IO3 8 | ); 9 | 10 | W25Q128JVxIM simulator( 11 | .CLK(CLK), 12 | .CSn(CSn), 13 | .DIO(IO0), 14 | .DO (IO1), 15 | .WPn(IO2), 16 | .HOLDn(IO3) 17 | ); 18 | 19 | endmodule 20 | -------------------------------------------------------------------------------- /projects/terrain/Makefile.test: -------------------------------------------------------------------------------- 1 | icebreaker: main.si 2 | ./compile.sh 3 | silice-make.py -s main.si -b $@ -p basic,vga,spiflash,buttons -o BUILD_$(subst :,_,$@) $(ARGS) 4 | 5 | verilator: main.si 6 | silice-make.py -s main.si -b $@ -p basic,vga -o BUILD_$(subst :,_,$@) $(ARGS) 7 | 8 | clean: 9 | rm -rf BUILD_* 10 | -------------------------------------------------------------------------------- /projects/terrain/all_interp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/terrain/all_interp.png -------------------------------------------------------------------------------- /projects/terrain/bin/icebreaker.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/terrain/bin/icebreaker.bin -------------------------------------------------------------------------------- /projects/terrain/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ./compile.sh 3 | if test -f "terrains.img"; then 4 | echo "Using existing terrains.img file." 5 | else 6 | make spiflash 7 | fi 8 | iceprog -o 1M terrains.img 9 | make icebreaker 10 | -------------------------------------------------------------------------------- /projects/terrain/build/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /projects/terrain/compile.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | export DIR=`pwd` 3 | echo $DIR 4 | pushd . 5 | cd ../fire-v/ 6 | ./compile_c_blaze_native.sh $DIR/firmware.c 7 | cp build/code*.hex $DIR/build/ 8 | popd 9 | -------------------------------------------------------------------------------- /projects/terrain/configs: -------------------------------------------------------------------------------- 1 | Makefile.test icebreaker 2 | -------------------------------------------------------------------------------- /projects/terrain/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | !README.md 4 | -------------------------------------------------------------------------------- /projects/terrain/figure_yc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/terrain/figure_yc.png -------------------------------------------------------------------------------- /projects/terrain/figure_zsteps.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/terrain/figure_zsteps.gif -------------------------------------------------------------------------------- /projects/terrain/figure_zsteps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/terrain/figure_zsteps.png -------------------------------------------------------------------------------- /projects/terrain/figure_zsteps.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | for i in {4..160} 3 | do 4 | echo "\$\$z_num_step = $i" > param.si 5 | ./simul.sh 6 | n=$(printf "%03d" $i) 7 | cp BUILD_verilator/vgaout_0006.tga SCRATCH/$n.tga 8 | done 9 | -------------------------------------------------------------------------------- /projects/terrain/firmware_simul.c: -------------------------------------------------------------------------------- 1 | #define SIMULATION 2 | 3 | #include "firmware.c" 4 | -------------------------------------------------------------------------------- /projects/terrain/no_interp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/terrain/no_interp.png -------------------------------------------------------------------------------- /projects/terrain/palette.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/terrain/palette.png -------------------------------------------------------------------------------- /projects/terrain/param.si: -------------------------------------------------------------------------------- 1 | $$z_num_step = 160 2 | -------------------------------------------------------------------------------- /projects/terrain/simul.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | export DIR=`pwd` 3 | echo $DIR 4 | pushd . 5 | cd ../fire-v/ 6 | ./compile_c_blaze_native.sh $DIR/firmware_simul.c 7 | cp build/code*.hex $DIR/build/ 8 | popd 9 | 10 | make clean 11 | make verilator 12 | -------------------------------------------------------------------------------- /projects/terrain/terrains.img: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/terrain/terrains.img -------------------------------------------------------------------------------- /projects/terrain/try.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | iceprog -o 1M terrains.img 3 | iceprog ./bin/icebreaker.bin 4 | -------------------------------------------------------------------------------- /projects/terrain/video.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/terrain/video.gif -------------------------------------------------------------------------------- /projects/terrain/z_interp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/terrain/z_interp.png -------------------------------------------------------------------------------- /projects/uart_echo/Makefile: -------------------------------------------------------------------------------- 1 | 2 | .DEFAULT: uart_echo.si 3 | silice-make.py -s uart_echo.si -b $@ -p basic,uart -o BUILD_$(subst :,_,$@) $(ARGS) 4 | 5 | de10nano: uart_echo.si 6 | silice-make.py -s uart_echo.si -b $@ -p basic,uart -o BUILD_$(subst :,_,$@) $(ARGS) 7 | 8 | clean: 9 | rm -rf BUILD_* 10 | -------------------------------------------------------------------------------- /projects/uart_echo/configs: -------------------------------------------------------------------------------- 1 | Makefile icestick 2 | Makefile icebreaker 3 | Makefile ulx3s 4 | -------------------------------------------------------------------------------- /projects/verilog-export/leds.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/verilog-export/leds.jpg -------------------------------------------------------------------------------- /projects/vga_dac.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_dac.jpg -------------------------------------------------------------------------------- /projects/vga_demo/Makefile: -------------------------------------------------------------------------------- 1 | 2 | .DEFAULT: vga_rototexture.si 3 | silice-make.py -s vga_rototexture.si -b $@ -p basic,vga -o BUILD_$(subst :,_,$@) $(ARGS) 4 | 5 | clean: 6 | rm -rf BUILD_* 7 | -------------------------------------------------------------------------------- /projects/vga_demo/Makefile.circles: -------------------------------------------------------------------------------- 1 | 2 | .DEFAULT: vga_circles.si 3 | silice-make.py -s vga_circles.si -b $@ -p basic,vga -o BUILD_$(subst :,_,$@) $(ARGS) 4 | 5 | clean: 6 | rm -rf BUILD_* 7 | -------------------------------------------------------------------------------- /projects/vga_demo/Makefile.copperbars: -------------------------------------------------------------------------------- 1 | 2 | .DEFAULT: vga_copperbars.si 3 | silice-make.py -s vga_copperbars.si -b $@ -p basic,vga -o BUILD_$(subst :,_,$@) $(ARGS) 4 | 5 | clean: 6 | rm -rf BUILD_* 7 | -------------------------------------------------------------------------------- /projects/vga_demo/Makefile.flyover3d: -------------------------------------------------------------------------------- 1 | 2 | .DEFAULT: vga_flyover3d.si 3 | silice-make.py -s vga_flyover3d.si -b $@ -p basic,vga -o BUILD_$(subst :,_,$@) $(ARGS) 4 | 5 | clean: 6 | rm -rf BUILD_* 7 | -------------------------------------------------------------------------------- /projects/vga_demo/Makefile.humanshader: -------------------------------------------------------------------------------- 1 | 2 | .DEFAULT: vga_humanshader.si 3 | silice-make.py -s vga_humanshader.si -b $@ -p basic,vga -o BUILD_$(subst :,_,$@) $(ARGS) 4 | 5 | clean: 6 | rm -rf BUILD_* 7 | -------------------------------------------------------------------------------- /projects/vga_demo/Makefile.mc: -------------------------------------------------------------------------------- 1 | 2 | .DEFAULT: vga_mc.si 3 | silice-make.py -s vga_mc.si -b $@ -p basic,vga -o BUILD_$(subst :,_,$@) $(ARGS) 4 | 5 | clean: 6 | rm -rf BUILD_* 7 | -------------------------------------------------------------------------------- /projects/vga_demo/Makefile.msponge: -------------------------------------------------------------------------------- 1 | 2 | .DEFAULT: vga_msponge.si 3 | silice-make.py -s vga_msponge.si -b $@ -p basic,vga -o BUILD_$(subst :,_,$@) $(ARGS) 4 | 5 | clean: 6 | rm -rf BUILD_* 7 | -------------------------------------------------------------------------------- /projects/vga_demo/Makefile.rototexture: -------------------------------------------------------------------------------- 1 | 2 | .DEFAULT: vga_rototexture.si 3 | silice-make.py -s vga_rototexture.si -b $@ -p basic,vga -o BUILD_$(subst :,_,$@) $(ARGS) 4 | 5 | clean: 6 | rm -rf BUILD_* 7 | -------------------------------------------------------------------------------- /projects/vga_demo/configs: -------------------------------------------------------------------------------- 1 | Makefile icebreaker 2 | Makefile icestick 3 | Makefile de10nano 4 | -------------------------------------------------------------------------------- /projects/vga_demo/random.v: -------------------------------------------------------------------------------- 1 | module random(input clock,output reg [11:0] rnd); 2 | wire [11:0] osc; 3 | metastable_oscillator m_osc[11:0] (.metastable(osc)); 4 | always @(posedge clock) begin 5 | rnd <= osc; 6 | end 7 | endmodule 8 | -------------------------------------------------------------------------------- /projects/vga_demo/tile.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_demo/tile.tga -------------------------------------------------------------------------------- /projects/vga_demo/vga_demo_copperbars.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_demo/vga_demo_copperbars.png -------------------------------------------------------------------------------- /projects/vga_demo/vga_demo_flyover3d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_demo/vga_demo_flyover3d.png -------------------------------------------------------------------------------- /projects/vga_demo/vga_demo_rototex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_demo/vga_demo_rototex.png -------------------------------------------------------------------------------- /projects/vga_test/Makefile: -------------------------------------------------------------------------------- 1 | 2 | .DEFAULT: vga_test.si 3 | silice-make.py -s vga_test.si -b $@ -p basic,vga -o BUILD_$(subst :,_,$@) $(ARGS) 4 | 5 | icarus: 6 | silice-make.py -s vga_test.si -b $@ -p basic,vga,top_only -o BUILD_$(subst :,_,$@) 7 | 8 | clean: 9 | rm -rf BUILD_* 10 | -------------------------------------------------------------------------------- /projects/vga_test/configs: -------------------------------------------------------------------------------- 1 | Makefile icebreaker 2 | Makefile icestick 3 | Makefile de10nano 4 | -------------------------------------------------------------------------------- /projects/vga_test/vga_test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_test/vga_test.png -------------------------------------------------------------------------------- /projects/vga_text_buffer/Makefile: -------------------------------------------------------------------------------- 1 | 2 | .DEFAULT: vga_text_buffer.si 3 | silice-make.py -s vga_text_buffer.si -b $@ -p basic,vga -o BUILD_$(subst :,_,$@) $(ARGS) 4 | 5 | clean: 6 | rm -rf BUILD_* 7 | -------------------------------------------------------------------------------- /projects/vga_text_buffer/README.md: -------------------------------------------------------------------------------- 1 | # VGA hello world 2 | 3 | A simple hello world using VGA, and meant to be simulated with the icarus_vga framework. 4 | The output (fst file) can be directly visualized with silicehe. 5 | -------------------------------------------------------------------------------- /projects/vga_text_buffer/configs: -------------------------------------------------------------------------------- 1 | Makefile icebreaker 2 | Makefile icestick 3 | Makefile de10nano 4 | Makefile ecpix5 5 | -------------------------------------------------------------------------------- /projects/vga_text_buffer/vga_text_buffer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_text_buffer/vga_text_buffer.png -------------------------------------------------------------------------------- /projects/vga_wfc/configs: -------------------------------------------------------------------------------- 1 | Makefile ulx3s 2 | -------------------------------------------------------------------------------- /projects/vga_wfc/problems/README.md: -------------------------------------------------------------------------------- 1 | Tiles sets from 2 | - https://github.com/mxgmn/WaveFunctionCollapse 3 | - https://beast-pixels.itch.io/overworld-tileset-grass-biome 4 | -------------------------------------------------------------------------------- /projects/vga_wfc/problems/circuits/tile_00.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/circuits/tile_00.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/circuits/tile_01.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/circuits/tile_01.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/circuits/tile_02.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/circuits/tile_02.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/circuits/tile_03.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/circuits/tile_03.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/circuits/tile_04.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/circuits/tile_04.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/circuits/tile_05.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/circuits/tile_05.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/circuits/tile_06.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/circuits/tile_06.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/circuits/tile_07.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/circuits/tile_07.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/circuits/tile_08.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/circuits/tile_08.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/circuits/tile_09.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/circuits/tile_09.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/circuits/tile_10.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/circuits/tile_10.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/circuits/tile_11.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/circuits/tile_11.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/circuits/tile_12.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/circuits/tile_12.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/circuits/tile_13.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/circuits/tile_13.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/circuits/tile_14.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/circuits/tile_14.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/circuits/tile_15.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/circuits/tile_15.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/circuits/tile_16.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/circuits/tile_16.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/circuits/tile_17.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/circuits/tile_17.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/circuits/tile_18.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/circuits/tile_18.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/circuits/tile_19.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/circuits/tile_19.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/circuits/tile_20.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/circuits/tile_20.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/circuits/tile_21.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/circuits/tile_21.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/circuits/tile_22.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/circuits/tile_22.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/circuits/tile_23.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/circuits/tile_23.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/circuits/tile_24.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/circuits/tile_24.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/circuits/tile_25.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/circuits/tile_25.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/circuits/tile_26.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/circuits/tile_26.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/circuits/tile_27.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/circuits/tile_27.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/circuits/tile_33.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/circuits/tile_33.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/circuits/tile_34.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/circuits/tile_34.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/circuits/tile_35.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/circuits/tile_35.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/circuits/tile_36.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/circuits/tile_36.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/circuits/tile_38.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/circuits/tile_38.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/circuits/tile_39.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/circuits/tile_39.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/knots/tile_00.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/knots/tile_00.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/knots/tile_01.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/knots/tile_01.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/knots/tile_02.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/knots/tile_02.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/knots/tile_03.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/knots/tile_03.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/knots/tile_04.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/knots/tile_04.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/knots/tile_05.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/knots/tile_05.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/knots/tile_06.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/knots/tile_06.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/knots/tile_07.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/knots/tile_07.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/knots/tile_08.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/knots/tile_08.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/knots/tile_09.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/knots/tile_09.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/knots/tile_10.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/knots/tile_10.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/knots/tile_11.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/knots/tile_11.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/knots/tile_12.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/knots/tile_12.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/paths/tile_00.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/paths/tile_00.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/paths/tile_01.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/paths/tile_01.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/paths/tile_02.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/paths/tile_02.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/paths/tile_03.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/paths/tile_03.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/paths/tile_04.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/paths/tile_04.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/paths/tile_05.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/paths/tile_05.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/paths/tile_06.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/paths/tile_06.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/paths/tile_07.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/paths/tile_07.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/paths/tile_08.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/paths/tile_08.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/paths/tile_09.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/paths/tile_09.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/paths/tile_10.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/paths/tile_10.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/paths/tile_11.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/paths/tile_11.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/paths/tile_12.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/paths/tile_12.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/paths/tile_13.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/paths/tile_13.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/paths/tile_14.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/paths/tile_14.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/summer/tile_00.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/summer/tile_00.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/summer/tile_01.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/summer/tile_01.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/summer/tile_02.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/summer/tile_02.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/summer/tile_03.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/summer/tile_03.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/summer/tile_04.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/summer/tile_04.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/summer/tile_05.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/summer/tile_05.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/summer/tile_06.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/summer/tile_06.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/summer/tile_07.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/summer/tile_07.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/summer/tile_08.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/summer/tile_08.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/summer/tile_09.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/summer/tile_09.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/summer/tile_10.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/summer/tile_10.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/summer/tile_11.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/summer/tile_11.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/summer/tile_12.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/summer/tile_12.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/summer/tile_13.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/summer/tile_13.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/summer/tile_14.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/summer/tile_14.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/summer/tile_15.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/summer/tile_15.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/summer/tile_16.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/summer/tile_16.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/summer/tile_17.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/summer/tile_17.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/summer/tile_18.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/summer/tile_18.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/summer/tile_19.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/summer/tile_19.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/summer/tile_20.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/summer/tile_20.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/summer/tile_21.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/summer/tile_21.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/summer/tile_22.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/summer/tile_22.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/summer/tile_23.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/summer/tile_23.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/summer/tile_24.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/summer/tile_24.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/summer/tile_25.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/summer/tile_25.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/summer/tile_26.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/summer/tile_26.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/summer/tile_27.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/summer/tile_27.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/summer/tile_28.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/summer/tile_28.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/summer/tile_29.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/summer/tile_29.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/summer/tile_30.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/summer/tile_30.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/summer/tile_31.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/summer/tile_31.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/summer/tile_32.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/summer/tile_32.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/summer/tile_33.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/summer/tile_33.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/summer/tile_34.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/summer/tile_34.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/summer/tile_35.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/summer/tile_35.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/summer/tile_36.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/summer/tile_36.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/summer/tile_37.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/summer/tile_37.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/summer/tile_38.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/summer/tile_38.tga -------------------------------------------------------------------------------- /projects/vga_wfc/problems/summer/tile_39.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/vga_wfc/problems/summer/tile_39.tga -------------------------------------------------------------------------------- /projects/video_sdram_test/configs: -------------------------------------------------------------------------------- 1 | Makefile ulx3s 2 | Makefile de10nano 3 | -------------------------------------------------------------------------------- /projects/video_sdram_test/video_sdram_test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/video_sdram_test/video_sdram_test.png -------------------------------------------------------------------------------- /projects/wolfpga/configs: -------------------------------------------------------------------------------- 1 | Makefile ulx3s 2 | -------------------------------------------------------------------------------- /projects/wolfpga/wolf.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/wolfpga/wolf.tga -------------------------------------------------------------------------------- /projects/wolfpga/wolfpga.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/projects/wolfpga/wolfpga.png -------------------------------------------------------------------------------- /python/silice/__init__.py: -------------------------------------------------------------------------------- 1 | from .silice import * 2 | import os 3 | 4 | silice.setSiliceRootPath( os.path.dirname(os.path.abspath(silice.__file__)) + "/silice" ) 5 | -------------------------------------------------------------------------------- /src/libs/lua/README: -------------------------------------------------------------------------------- 1 | 2 | This is Lua 5.3.5, released on 26 Jun 2018. 3 | 4 | For installation instructions, license details, and 5 | further information about Lua, see doc/readme.html. 6 | 7 | -------------------------------------------------------------------------------- /src/libs/lua/doc/index.css: -------------------------------------------------------------------------------- 1 | ul { 2 | list-style-type: none ; 3 | } 4 | 5 | ul.contents { 6 | padding: 0 ; 7 | } 8 | 9 | table { 10 | border: none ; 11 | border-spacing: 0 ; 12 | border-collapse: collapse ; 13 | } 14 | 15 | td { 16 | vertical-align: top ; 17 | padding: 0 ; 18 | text-align: left ; 19 | line-height: 1.25 ; 20 | width: 15% ; 21 | } 22 | -------------------------------------------------------------------------------- /src/libs/lua/doc/logo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/src/libs/lua/doc/logo.gif -------------------------------------------------------------------------------- /src/libs/lua/doc/manual.css: -------------------------------------------------------------------------------- 1 | h3 code { 2 | font-family: inherit ; 3 | font-size: inherit ; 4 | } 5 | 6 | pre, code { 7 | font-size: 12pt ; 8 | } 9 | 10 | span.apii { 11 | color: gray ; 12 | float: right ; 13 | font-family: inherit ; 14 | font-style: normal ; 15 | font-size: small ; 16 | } 17 | 18 | h2:before { 19 | content: "" ; 20 | padding-right: 0em ; 21 | } 22 | -------------------------------------------------------------------------------- /src/libs/lua/doc/osi-certified-72x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/src/libs/lua/doc/osi-certified-72x60.png -------------------------------------------------------------------------------- /src/libs/lua/src/lua.hpp: -------------------------------------------------------------------------------- 1 | // lua.hpp 2 | // Lua header files for C++ 3 | // <> not supplied automatically because Lua also compiles as C++ 4 | 5 | extern "C" { 6 | #include "lua.h" 7 | #include "lualib.h" 8 | #include "lauxlib.h" 9 | } 10 | -------------------------------------------------------------------------------- /src/libs/luabind-deboostified/.gitignore: -------------------------------------------------------------------------------- 1 | bin.v2 2 | bin 3 | doc/*.html 4 | doc/version.rst 5 | build 6 | lua -------------------------------------------------------------------------------- /src/libs/luabind-deboostified/.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "test/jenkins-ctest-plugin"] 2 | path = test/jenkins-ctest-plugin 3 | url = https://rpavlik@github.com/rpavlik/jenkins-ctest-plugin.git 4 | -------------------------------------------------------------------------------- /src/libs/luabind-deboostified/doc/luabind.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/src/libs/luabind-deboostified/doc/luabind.png -------------------------------------------------------------------------------- /src/libs/luabind-deboostified/doc/version.rst.in: -------------------------------------------------------------------------------- 1 | .. |version| replace:: @DOCS_VERSION@ 2 | -------------------------------------------------------------------------------- /src/libs/luabind-deboostified/examples/cln/README: -------------------------------------------------------------------------------- 1 | To build this example you need to have CLN installed. It can be found at 2 | 3 | http://www.ginac.de/CLN/ 4 | 5 | -------------------------------------------------------------------------------- /src/libs/luabind-deboostified/examples/hello_world/README: -------------------------------------------------------------------------------- 1 | this example will build an extension module as a shared library, use 2 | loadlib() from within the lua interpreter to load the library, it will 3 | then export a function named greet() which you can call. 4 | 5 | > loadlib('hello_world.dll', 'init')() 6 | > greet() 7 | Hello world! 8 | > 9 | 10 | -------------------------------------------------------------------------------- /src/libs/luabind-deboostified/examples/regexp/regex.lua: -------------------------------------------------------------------------------- 1 | 2 | html_tag = regex("<(.*?)>") 3 | src = 'dadasdsa' 4 | 5 | while html_tag:search(src) do 6 | print('tag: ' .. html_tag:what(1)) 7 | src = string.sub(src, html_tag:position(0) + html_tag:length(0)) 8 | end 9 | 10 | print('-------------') 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/libs/luabind-deboostified/luabind/detail/conversion_policies/function_converter.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/src/libs/luabind-deboostified/luabind/detail/conversion_policies/function_converter.hpp -------------------------------------------------------------------------------- /src/libs/luabind-deboostified/src/headertest.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /src/libs/luabind-deboostified/test/test_headercompile.cpp.in: -------------------------------------------------------------------------------- 1 | 2 | #include"@FULLHEADER@" 3 | 4 | int main(int /*argc*/, char* /*argv*/[]) { 5 | return 0; 6 | } 7 | -------------------------------------------------------------------------------- /src/libs/tclap/AUTHORS: -------------------------------------------------------------------------------- 1 | 2 | original author: Michael E. Smoot 3 | invaluable contributions: Daniel Aarno 4 | more contributions: Erik Zeek 5 | more contributions: Fabien Carmagnac (Tinbergen-AM) 6 | outstanding editing: Carol Smoot 7 | -------------------------------------------------------------------------------- /src/tga.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | typedef struct 4 | { 5 | uint width; 6 | uint height; 7 | uchar depth; 8 | uchar *pixels; 9 | uchar *colormap; 10 | uint colormap_size; 11 | uint colormap_chans; 12 | } t_image_nfo; 13 | 14 | t_image_nfo *ReadTGAFile(const char *filename); 15 | -------------------------------------------------------------------------------- /tests/.gitignore: -------------------------------------------------------------------------------- 1 | *.lpp 2 | out.v 3 | -------------------------------------------------------------------------------- /tests/Makefile: -------------------------------------------------------------------------------- 1 | 2 | .DEFAULT: $@.si.lpp 3 | silice-make.py -s $@.si -b verilator -p basic -o BUILD_$(subst :,_,$@) $(ARGS) 4 | 5 | clean: 6 | rm -rf BUILD_* 7 | -------------------------------------------------------------------------------- /tests/Makefile.icarus: -------------------------------------------------------------------------------- 1 | 2 | .DEFAULT: $@.si.lpp 3 | silice-make.py -s $@.si -b icarus -p basic -o BUILD_$(subst :,_,$@) 4 | 5 | clean: 6 | rm -rf BUILD_* 7 | -------------------------------------------------------------------------------- /tests/Makefile.icestick: -------------------------------------------------------------------------------- 1 | 2 | .DEFAULT: $@.si.lpp 3 | silice-make.py -s $@.si -b icestick -p basic -o BUILD_$(subst :,_,$@) $(ARGS) 4 | 5 | clean: 6 | rm -rf BUILD_* 7 | -------------------------------------------------------------------------------- /tests/alg0.si: -------------------------------------------------------------------------------- 1 | 2 | algorithm alg(input uint8 num,output uint8 ret) 3 | { 4 | ret = num; 5 | } 6 | 7 | algorithm main( 8 | output int8 leds 9 | ) 10 | { 11 | uint8 val = 231; 12 | 13 | alg alg0; 14 | 15 | (leds) <- alg0 <- (val); 16 | } 17 | 18 | -------------------------------------------------------------------------------- /tests/alg2.si: -------------------------------------------------------------------------------- 1 | algorithm adder(input int8 a,input int8 b,output int8 v) 2 | { 3 | loop: 4 | v = a + b; 5 | goto loop; 6 | } 7 | 8 | algorithm main(output int8 leds) 9 | { 10 | int8 r = 0; 11 | adder a1; 12 | 13 | a1.a = 1; 14 | a1.b = 2; 15 | ++: 16 | r = a1.v + 2; 17 | } 18 | -------------------------------------------------------------------------------- /tests/alg_output_init.si: -------------------------------------------------------------------------------- 1 | algorithm test1( 2 | input uint8 a, 3 | input uint8 b, 4 | input uint8 c, 5 | output uint8 v = 112, 6 | ) { 7 | v = a + b + c; 8 | } 9 | 10 | algorithm main(output uint8 leds) 11 | { 12 | test1 t1; 13 | 14 | uint8 z = 0; 15 | 16 | (z) <- t1 <- (10,11,12); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /tests/always.si: -------------------------------------------------------------------------------- 1 | unit main(output uint8 leds) 2 | { 3 | 4 | always { 5 | __display("would run forever %d",leds); 6 | leds = leds + 1; 7 | if (leds == 255) { 8 | __display("stoping with __finish"); 9 | __finish(); 10 | } 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /tests/alwsblk1.si: -------------------------------------------------------------------------------- 1 | algorithm main(output uint8 leds) 2 | { 3 | 4 | uint8 a = 0; 5 | uint8 b = 0; 6 | 7 | leds := b; 8 | 9 | always { 10 | leds = a; 11 | if (b == 0) { 12 | leds = 5; 13 | } 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /tests/attribs1.si: -------------------------------------------------------------------------------- 1 | algorithm main(output uint8 leds) 2 | { 3 | 4 | uint8 a = 0 (* IOB="TRUE" *); 5 | ++: 6 | a = a + 1; 7 | 8 | } 9 | -------------------------------------------------------------------------------- /tests/autop1.si: -------------------------------------------------------------------------------- 1 | unit main(output uint8 leds) 2 | { 3 | algorithm { 4 | uint16 cycle=0; 5 | 6 | while (cycle < 4) { 7 | { // stage 0 8 | 9 | } -> { // stage 1 10 | 11 | ++: 12 | 13 | } -> { // stage 2 14 | 15 | } 16 | cycle = cycle + 1; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /tests/bfield1.si: -------------------------------------------------------------------------------- 1 | bitfield Node { 2 | uint16 right, 3 | uint16 left 4 | } 5 | 6 | algorithm main(output uint8 leds) 7 | { 8 | uint32 data = Node(left=16hffff,right=16h1234); 9 | 10 | uint16 l = 0; 11 | uint16 r = 0; 12 | 13 | l = Node(data).left; 14 | r = Node(data).right; 15 | 16 | __display("%x %x",l,r); 17 | } -------------------------------------------------------------------------------- /tests/bfield2.si: -------------------------------------------------------------------------------- 1 | bitfield Node { 2 | uint16 right, 3 | uint16 left 4 | } 5 | 6 | algorithm main(output uint8 leds) 7 | { 8 | uint32 data = Node(left=16hffff,right=16h1234); 9 | 10 | uint16 l = 33; 11 | 12 | Node(data).left = 33; 13 | } 14 | -------------------------------------------------------------------------------- /tests/bind2.si: -------------------------------------------------------------------------------- 1 | unit foo(input uint1 a,input uint1 b) 2 | { 3 | 4 | } 5 | 6 | unit main(input uint2 tmp,output uint8 leds) 7 | { 8 | foo f( 9 | a <: tmp[0,1], 10 | b <: tmp[1,1], 11 | ); 12 | 13 | algorithm { 14 | __display("hello world"); 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /tests/bind7.si: -------------------------------------------------------------------------------- 1 | unit foo(inout uint2 a) 2 | { 3 | always { 4 | a.oenable = 2b11; 5 | a.o = 2b01; 6 | } 7 | } 8 | 9 | unit main(inout uint4 tmp,output uint8 leds) 10 | { 11 | 12 | foo f( 13 | a <:> tmp[0,2] // ok, width do match 14 | ); 15 | 16 | algorithm { 17 | __display("hello world"); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /tests/bndwires.v: -------------------------------------------------------------------------------- 1 | module vfoo(input [7:0] v,output [7:0] o); 2 | 3 | assign o = v; 4 | 5 | endmodule 6 | -------------------------------------------------------------------------------- /tests/bram1.si: -------------------------------------------------------------------------------- 1 | algorithm main(output uint8 leds) 2 | { 3 | int8 v(0); 4 | bram uint8 table[4] = {10,11,12,13}; 5 | 6 | table.wenable = 0; 7 | table.addr = 0; 8 | table.wdata = 133; 9 | ++: 10 | v = table_rdata; 11 | ++: 12 | __display("v = %d",v); 13 | } 14 | -------------------------------------------------------------------------------- /tests/bram_data.inc: -------------------------------------------------------------------------------- 1 | 11,22,33,44 -------------------------------------------------------------------------------- /tests/break1.si: -------------------------------------------------------------------------------- 1 | algorithm main(output uint8 leds) 2 | { 3 | 4 | int8 a = 10; 5 | int8 b = 1; 6 | 7 | while (a > 0) { 8 | a = a - 1; 9 | if (a == 5) { 10 | break; 11 | b = 2; 12 | } 13 | while (b != 10) { 14 | b = b + 3; 15 | if (b == 15) { 16 | break; 17 | } 18 | } 19 | } 20 | 21 | } -------------------------------------------------------------------------------- /tests/case_dq.si: -------------------------------------------------------------------------------- 1 | algorithm main(output uint8 leds) 2 | { 3 | uint8 outp(0); uint8 inp(0); 4 | uint8 a = uninitialized; 5 | 6 | switch (inp) 7 | { 8 | case 0: { 9 | a = 1; 10 | } 11 | case 1: { 12 | a = 2; 13 | } 14 | default: { 15 | a = 3; 16 | } 17 | } 18 | 19 | outp = a; 20 | 21 | } -------------------------------------------------------------------------------- /tests/circuits1.si: -------------------------------------------------------------------------------- 1 | circuitry shift_right(input a,output b,output c) 2 | { 3 | b = a >> 3; 4 | c = b + 1; 5 | } 6 | 7 | algorithm main(output uint8 leds) 8 | { 9 | uint16 r = 10000; 10 | while (r != 1) { 11 | (leds,r) = shift_right(r); 12 | __display("%d",r); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /tests/circuits11.si: -------------------------------------------------------------------------------- 1 | circuitry test_circuit(input a,output b) 2 | { 3 | __display("input=%d",a); 4 | b = a; 5 | } 6 | 7 | algorithm main(output uint8 leds) 8 | { 9 | uint4 tbl1[3] = {15,14,13}; 10 | uint4 tbl2[3] = {12,11,10}; 11 | uint4 a(100); 12 | (a) = test_circuit(tbl1[0]); //// TODO FIXME: name collision? 13 | __display("%d",a); 14 | } 15 | -------------------------------------------------------------------------------- /tests/circuits14.si: -------------------------------------------------------------------------------- 1 | circuitry test(output result,input a) 2 | { 3 | $$print('\n\nwidth = ' .. widthof('a') .. '\n') 4 | result = a; 5 | } 6 | 7 | algorithm main(output uint8 leds) 8 | { 9 | uint24 t(0); 10 | uint8 z(0); 11 | 12 | (t) = test(z[0,4]); 13 | } 14 | -------------------------------------------------------------------------------- /tests/circuits15.si: -------------------------------------------------------------------------------- 1 | circuitry msbs_to_one(output result) 2 | { 3 | $$for i=widthof('result')>>1,widthof('result')-1 do 4 | result[$i$,1] = 1; 5 | $$end 6 | } 7 | 8 | algorithm main(output uint8 leds) 9 | { 10 | uint12 a(0); uint20 b(0); 11 | (a) = msbs_to_one(); 12 | (b) = msbs_to_one(); 13 | __display("a = %b, b = %b",a,b); 14 | } -------------------------------------------------------------------------------- /tests/circuits3.si: -------------------------------------------------------------------------------- 1 | circuitry test_circuit() // empty circuit 2 | { 3 | 4 | } 5 | 6 | algorithm main(output uint8 leds) 7 | { 8 | () = test_circuit(); 9 | } 10 | -------------------------------------------------------------------------------- /tests/circuits5.si: -------------------------------------------------------------------------------- 1 | circuitry test_circuit(input a,inout mem,output b) 2 | { 3 | mem.addr = a; 4 | ++: 5 | b = mem.rdata; 6 | } 7 | 8 | algorithm main(output uint8 leds) 9 | { 10 | bram uint8 test_mem[] = {1,2,3,44,5,6}; 11 | uint8 a = 3; 12 | (test_mem,leds) = test_circuit(a,test_mem); 13 | __display("%d",leds); 14 | } 15 | -------------------------------------------------------------------------------- /tests/circuits6.si: -------------------------------------------------------------------------------- 1 | circuitry test_circuit(input a,output b) 2 | { 3 | b = a + 2; 4 | } 5 | 6 | algorithm main(output uint8 leds) 7 | { 8 | uint8 a = 0; 9 | uint8 c = 3; 10 | (leds) = test_circuit(c); 11 | __display("%d",leds); 12 | } 13 | -------------------------------------------------------------------------------- /tests/circuits7.si: -------------------------------------------------------------------------------- 1 | 2 | group grp { 3 | uint8 a(10), 4 | uint8 b(3) 5 | } 6 | 7 | circuitry test_circuit(input f,input q,output o) 8 | { 9 | o = f.a + f.b + q; 10 | } 11 | 12 | algorithm main(output uint8 leds) 13 | { 14 | grp g; 15 | (leds) = test_circuit(g,g.a); 16 | __display("%d",leds); 17 | } 18 | -------------------------------------------------------------------------------- /tests/circuits8.si: -------------------------------------------------------------------------------- 1 | 2 | circuitry test_circuit(input a,output b) 3 | { 4 | b = a + 1; 5 | } 6 | 7 | algorithm main(output uint8 leds) 8 | { 9 | uint8 v(100); 10 | (leds) = test_circuit(1+5+v); 11 | __display("%d",leds); 12 | } 13 | -------------------------------------------------------------------------------- /tests/cmdline.si: -------------------------------------------------------------------------------- 1 | $$if YOSYS then 2 | $$print('YOSYS defined on command line') 3 | $$else 4 | $$print('yosys NOT defined on command line') 5 | $$end 6 | 7 | unit main(output uint8 leds) { always { __finish(); } } -------------------------------------------------------------------------------- /tests/combloop5.si: -------------------------------------------------------------------------------- 1 | unit main(output uint8 leds) 2 | { 3 | uint8 a(0); 4 | uint16 b(0); 5 | 6 | always { 7 | a = 2; 8 | a = b[4,widthof(a)] + 1; // fine, was triggering a false positive before 9 | 10 | uint8 iter(0); 11 | if (iter == 255) { __finish(); } 12 | iter=iter+1; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /tests/combloop6.si: -------------------------------------------------------------------------------- 1 | unit foo(input uint8 i) 2 | { 3 | 4 | } 5 | 6 | unit main(output uint8 leds) 7 | { 8 | uint8 a(0); 9 | 10 | foo f(i <: a); 11 | 12 | always { 13 | // a = 10; 14 | a[0,4] = 10; // fine, was triggering false positive 15 | 16 | uint8 iter(0); 17 | if (iter == 255) { __finish(); } 18 | iter=iter+1; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /tests/combloop7.si: -------------------------------------------------------------------------------- 1 | unit foo(input uint8 i) 2 | { 3 | 4 | } 5 | 6 | unit main(output uint8 leds) 7 | { 8 | uint8 a(0); 9 | 10 | foo f(i <: a); 11 | 12 | always { 13 | a = a + 1; // fine, was triggering false positive 14 | 15 | uint8 iter(0); 16 | if (iter == 255) { __finish(); } 17 | iter=iter+1; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /tests/concat.si: -------------------------------------------------------------------------------- 1 | algorithm main(output uint8 leds) 2 | { 3 | int8 i(0); int10 c(0); int10 d(0); int10 e(0); 4 | int6 a = 6b111000; 5 | int2 b = 2b10; 6 | c := {b,a,2b11}; 7 | d := {{4{b[1,1]}},a}; 8 | e := { {2{ {2{b[1,1]}} , a[0,2]} },4b1111}; 9 | } 10 | -------------------------------------------------------------------------------- /tests/config1.si: -------------------------------------------------------------------------------- 1 | $$config['bram_wenable_width'] = '1' 2 | 3 | algorithm main( 4 | output uint8 leds 5 | ) 6 | { 7 | bram int8 test_ram[] = {1,2,3,4}; 8 | brom int8 test_rom[] = {5,6,7,8}; 9 | dualport_bram int8 test_dpram[] = {9,10,11,12}; 10 | 11 | leds = 0; 12 | } 13 | -------------------------------------------------------------------------------- /tests/dblflipflop.si: -------------------------------------------------------------------------------- 1 | algorithm main(output uint8 leds) 2 | { 3 | int8 a(0); int8 c(0); 4 | int8 b = 0; 5 | b ::= a; 6 | c = b; 7 | } -------------------------------------------------------------------------------- /tests/decl2.si: -------------------------------------------------------------------------------- 1 | algorithm main(output uint8 leds) 2 | { 3 | uint8 w <:: a + 10; 4 | uint8 a(50); 5 | 6 | a = 1; 7 | uint8 b = a + 10; 8 | uint8 c = b + 100; 9 | 10 | // b = a; // ok 11 | // b = c; // ok 12 | 13 | a = 9; 14 | 15 | //uint8 b = a + 10 + b; /// FIXME TODO: should trigger an error 16 | 17 | // b = 5; 18 | 19 | __display("%d",c); 20 | 21 | } 22 | -------------------------------------------------------------------------------- /tests/decl4.si: -------------------------------------------------------------------------------- 1 | algorithm main(output uint8 leds) 2 | { 3 | uint8 n(0); 4 | 5 | while (n != 3) { 6 | 7 | __display("[1] %d",n); 8 | n = n + 1; 9 | 10 | -> 11 | 12 | uint8 v = n + 10; 13 | __display("[2] %d",v); 14 | 15 | -> 16 | 17 | __display("[3] %d",v); 18 | 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /tests/depds2.si: -------------------------------------------------------------------------------- 1 | 2 | algorithm main(output uint8 leds) 3 | { 4 | uint8 a = 0; 5 | uint8 b = 0; 6 | uint8 c = 0; 7 | uint8 d = 0; 8 | 9 | { 10 | 11 | if (a == 0) { 12 | 13 | if (b == 0) { 14 | a = 1; 15 | } else { 16 | 17 | } 18 | 19 | } 20 | 21 | if (a == 0) { 22 | c = 1; 23 | } 24 | 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /tests/display1.si: -------------------------------------------------------------------------------- 1 | algorithm main(output int8 leds) 2 | { 3 | 4 | uint8 a = 1; 5 | uint8 b = 31; 6 | uint8 c = 42; 7 | 8 | __display("hello world %b %d %h",a,b,c); 9 | 10 | } -------------------------------------------------------------------------------- /tests/divbyten.si: -------------------------------------------------------------------------------- 1 | 2 | algorithm main(output uint8 leds) 3 | { 4 | 5 | uint16 val = 231; 6 | uint16 reciprocal = 16h199A; 7 | uint32 tmp = 0; 8 | uint16 res = 0; 9 | 10 | tmp = val * reciprocal; 11 | 12 | res = (tmp >> 16); 13 | 14 | __display("result = %d",res); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /tests/divint_hdmi/README.md: -------------------------------------------------------------------------------- 1 | # DivInt HDMI 2 | 3 | This is a small demo project for the Mojo board with the HDMI shield. 4 | 5 | It displays a run of integers division. 6 | 7 | The main goal is to illustrate the ability to make more complex projects with 8 | file inclusions ($include). 9 | -------------------------------------------------------------------------------- /tests/doc1.si: -------------------------------------------------------------------------------- 1 | unit adder(input uint8 a,input uint8 b,output uint8 v) 2 | { 3 | v := a + b; 4 | } 5 | 6 | unit main(output uint8 leds) 7 | { 8 | uint8 a(2); 9 | uint8 b(5); 10 | uint8 c(0); 11 | adder add(a <: a, b <: b, v :> c); 12 | algorithm { 13 | __display("c = %d",c); 14 | } 15 | } -------------------------------------------------------------------------------- /tests/error_checks/.gitignore: -------------------------------------------------------------------------------- 1 | *.lpp 2 | -------------------------------------------------------------------------------- /tests/error_checks/Makefile: -------------------------------------------------------------------------------- 1 | 2 | .DEFAULT: $@.si.lpp 3 | silice-make.py -s $@.si -b verilator -p basic -o BUILD_$(subst :,_,$@) $(ARGS) 4 | 5 | clean: 6 | rm -rf BUILD_* 7 | -------------------------------------------------------------------------------- /tests/error_checks/__id.si: -------------------------------------------------------------------------------- 1 | 2 | algorithm main(output int8 led) 3 | { 4 | led = __id; // used outside of repeat block 5 | } 6 | -------------------------------------------------------------------------------- /tests/error_checks/alg1.si: -------------------------------------------------------------------------------- 1 | 2 | algorithm test(input int8 a,output int8 v) 3 | { 4 | 5 | // } // missing brace 6 | 7 | algorithm main(output int8 led) 8 | { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /tests/error_checks/alg2.si: -------------------------------------------------------------------------------- 1 | 2 | algorithm main(input int1 button,output int8 led) 3 | { 4 | button = 1; 5 | } 6 | -------------------------------------------------------------------------------- /tests/error_checks/alg_call1.si: -------------------------------------------------------------------------------- 1 | 2 | algorithm test(input int8 a,input int8 b,output int8 v) 3 | { 4 | 5 | } 6 | 7 | algorithm main(output int8 led) 8 | { 9 | int8 x = 1; 10 | int8 y = 2; 11 | test t1; 12 | 13 | (led) <- t1 <- (x); 14 | } 15 | -------------------------------------------------------------------------------- /tests/error_checks/alg_call2.si: -------------------------------------------------------------------------------- 1 | 2 | algorithm test( 3 | input int8 a,input int8 b,output int8 v) 4 | { 5 | 6 | } 7 | 8 | algorithm main(input int8 i, output int8 led) 9 | { 10 | int8 x = 1; 11 | int8 y = 2; 12 | test t1( 13 | a <: i 14 | ); 15 | 16 | (led) <- t1 <- (x,y); 17 | } 18 | -------------------------------------------------------------------------------- /tests/error_checks/alg_call3.si: -------------------------------------------------------------------------------- 1 | algorithm test(input int8 a,input int8 b,output int8 v) 2 | { 3 | 4 | } 5 | 6 | algorithm main(output int8 led) 7 | { 8 | int8 x = 1; 9 | int8 y = 2; 10 | test t1; 11 | 12 | (led,y) <- t1 <- (x,y); // error reading back output 13 | } 14 | -------------------------------------------------------------------------------- /tests/error_checks/alg_call4.si: -------------------------------------------------------------------------------- 1 | algorithm test(input int8 a,input int8 b,output int8 v) 2 | { 3 | 4 | } 5 | 6 | algorithm main(input int8 i, output int8 led) 7 | { 8 | int8 x = 1; 9 | int8 y = 2; 10 | test t1(a <: i); 11 | 12 | (led) <- t1 <- (x,y); 13 | 14 | t1.a = i; 15 | 16 | } 17 | -------------------------------------------------------------------------------- /tests/error_checks/alg_call5.si: -------------------------------------------------------------------------------- 1 | 2 | algorithm test( 3 | input int8 a,input int8 b,output int8 v) 4 | { 5 | 6 | } 7 | 8 | algorithm main(input int8 i, output int8 led) 9 | { 10 | test t1; 11 | 12 | (led) <- foo <- (x,y); 13 | } 14 | -------------------------------------------------------------------------------- /tests/error_checks/alg_call6.si: -------------------------------------------------------------------------------- 1 | 2 | algorithm test( 3 | input int8 a,input int8 b,output int8 v) 4 | { 5 | 6 | } 7 | 8 | algorithm main(input int8 i, output int8 led) 9 | { 10 | test t1; 11 | 12 | foo <- (x,y); 13 | } 14 | -------------------------------------------------------------------------------- /tests/error_checks/alg_call7.si: -------------------------------------------------------------------------------- 1 | 2 | algorithm test( 3 | input int8 a,input int8 b,output int8 v) 4 | { 5 | 6 | } 7 | 8 | algorithm main(input int8 i, output int8 led) 9 | { 10 | int8 x = 0; 11 | int8 y = 0; 12 | test t1; 13 | 14 | t1 <- (x,y); 15 | (led) <- foo; 16 | } 17 | -------------------------------------------------------------------------------- /tests/error_checks/alg_call8.si: -------------------------------------------------------------------------------- 1 | 2 | algorithm test( 3 | input int8 a,input int8 b,output int8 v) 4 | { 5 | 6 | } 7 | 8 | algorithm main(input int8 i, output int8 led) 9 | { 10 | int8 x = 0; 11 | int8 y = 0; 12 | int1 other_clock = 0; 13 | test t1<@other_clock>; 14 | 15 | // t1 <- (x,y); 16 | // (led) <- t1; 17 | (led) <- t1 <- (x,y); 18 | } 19 | -------------------------------------------------------------------------------- /tests/error_checks/alg_inst_dupl.si: -------------------------------------------------------------------------------- 1 | algorithm test(input int8 a,output int8 b) 2 | { 3 | b <: a; 4 | } 5 | 6 | 7 | algorithm main(output int8 led) 8 | { 9 | test t1; 10 | test t2; 11 | test t1; 12 | } 13 | -------------------------------------------------------------------------------- /tests/error_checks/algcomb1.si: -------------------------------------------------------------------------------- 1 | algorithm foo( 2 | input uint1 i, 3 | output! uint1 o 4 | ) { 5 | o = i; 6 | } 7 | 8 | algorithm main(output uint8 leds) 9 | { 10 | 11 | uint1 a = 0; 12 | uint1 b = 0; 13 | 14 | foo f( // expected to generate an error 15 | i <: a, 16 | o :> b 17 | ); 18 | 19 | a = b; 20 | 21 | } -------------------------------------------------------------------------------- /tests/error_checks/always1.si: -------------------------------------------------------------------------------- 1 | algorithm main(output int8 leds) 2 | { 3 | int22 data = 0; 4 | int8 myled = 0; 5 | 6 | data = 1; 7 | myled = 0; 8 | 9 | leds := myled; // should be first 10 | 11 | } 12 | -------------------------------------------------------------------------------- /tests/error_checks/alws1.si: -------------------------------------------------------------------------------- 1 | algorithm main(output uint8 leds) 2 | { 3 | uint8 a = 0; 4 | always { 5 | leds := a; // error: no allowed here 6 | } 7 | 8 | } 9 | -------------------------------------------------------------------------------- /tests/error_checks/bind6.si: -------------------------------------------------------------------------------- 1 | unit foo(inout uint2 a) 2 | { 3 | always { 4 | a.oenable = 2b11; 5 | a.o = 2b01; 6 | } 7 | } 8 | 9 | unit main(inout uint2 tmp,output uint8 leds) 10 | { 11 | 12 | foo f( 13 | a <:> tmp[0,1], // error: width mismatch 14 | ); 15 | 16 | algorithm { 17 | __display("hello world"); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /tests/error_checks/bindings1.si: -------------------------------------------------------------------------------- 1 | 2 | algorithm test(input int8 a,output int8 v) 3 | { 4 | 5 | } 6 | 7 | algorithm main(output int8 led) 8 | { 9 | int8 b = 0; 10 | 11 | test t0( 12 | v :> led, 13 | a <: b 14 | ); 15 | 16 | // bla 17 | // bla 18 | 19 | test t1( 20 | v :> led, 21 | a <: missing 22 | ); 23 | } 24 | -------------------------------------------------------------------------------- /tests/error_checks/bindings2.si: -------------------------------------------------------------------------------- 1 | 2 | algorithm test(input int8 a,output int8 v) 3 | { 4 | 5 | } 6 | 7 | algorithm main(output int8 led) 8 | { 9 | int8 b = 0; 10 | 11 | test t0( 12 | v <: led, 13 | a <: b 14 | ); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /tests/error_checks/bindings3.si: -------------------------------------------------------------------------------- 1 | 2 | algorithm test(input int8 a,output int8 v) 3 | { 4 | 5 | } 6 | 7 | algorithm main(output int8 led) 8 | { 9 | int8 b = 0; 10 | 11 | test t0( 12 | v :> b 13 | ); 14 | 15 | b = 4; 16 | 17 | } 18 | -------------------------------------------------------------------------------- /tests/error_checks/break.si: -------------------------------------------------------------------------------- 1 | 2 | algorithm main(output int8 led) 3 | { 4 | break; // illegal break 5 | } 6 | -------------------------------------------------------------------------------- /tests/error_checks/call1.si: -------------------------------------------------------------------------------- 1 | algorithm main(output int8 led) 2 | { 3 | int8 t = 0; 4 | call non_existant; 5 | } 6 | -------------------------------------------------------------------------------- /tests/error_checks/circuits2.si: -------------------------------------------------------------------------------- 1 | circuitry test_circuit(input a,output b,output c) 2 | { 3 | b = a + 1; 4 | c = b + 1; 5 | } 6 | 7 | algorithm main(output uint8 leds) 8 | { 9 | uint8 r = 1; 10 | while (1) { 11 | (r,r) = test_circuit(r); // combinational cycle through the circuitry 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /tests/error_checks/circuits4.si: -------------------------------------------------------------------------------- 1 | circuitry test_circuit(input a,output b) 2 | { 3 | __display("a=%d",a); 4 | b = a; 5 | } 6 | 7 | algorithm main(output uint8 leds) 8 | { 9 | uint4 tbl1[3] = {15,14,13}; 10 | uint4 tbl2[3] = {12,11,10}; 11 | (tbl2[2]) = test_circuit(tbl1[0]); 12 | // ^^^^ not possible, expected to trigger an error 13 | __display("%d",tbl2[2]); 14 | } 15 | -------------------------------------------------------------------------------- /tests/error_checks/combcycl.si: -------------------------------------------------------------------------------- 1 | 2 | algorithm main(output int8 led) 3 | { 4 | int8 x = 1; 5 | 6 | x = x + 1; 7 | x = x + 2; 8 | 9 | } 10 | -------------------------------------------------------------------------------- /tests/error_checks/combloop10.si: -------------------------------------------------------------------------------- 1 | unit inc(input uint8 i,output! uint8 o) 2 | { // unregistered output ^^ 3 | always { 4 | o = i + 1; 5 | } 6 | } 7 | // main unit 8 | unit main(output uint8 leds) 9 | { 10 | uint8 a(0); uint8 b(0); 11 | inc i0(i <: a,o :> b); 12 | always { 13 | // i0.i = i0.o; 14 | a = b; 15 | __display("i0.o:%d",i0.o); 16 | } 17 | } -------------------------------------------------------------------------------- /tests/error_checks/combloop11.si: -------------------------------------------------------------------------------- 1 | unit inc(input uint8 i,output! uint8 o) 2 | { // unregistered output ^^ 3 | always { 4 | o = i + 1; 5 | } 6 | } 7 | // main unit 8 | unit main(output uint8 leds) 9 | { 10 | uint8 a(0); uint8 b(0); 11 | 12 | inc i0(i <: a,o :> b); 13 | inc i1(i <: b,o :> a); 14 | 15 | always { } 16 | } -------------------------------------------------------------------------------- /tests/error_checks/combloop12.si: -------------------------------------------------------------------------------- 1 | unit inc(input uint8 i,output! uint8 o) 2 | { // unregistered output ^^ 3 | always { 4 | o = i + 1; 5 | } 6 | } 7 | // main unit 8 | unit main(output uint8 leds) 9 | { 10 | uint8 a(0); 11 | uint8 b(0); 12 | 13 | inc i0(i <: a,o :> b); 14 | 15 | always { 16 | a = b + 1; 17 | } 18 | } -------------------------------------------------------------------------------- /tests/error_checks/combloop13.si: -------------------------------------------------------------------------------- 1 | // main unit 2 | unit main(output uint8 leds) 3 | { 4 | uint8 a(0); 5 | 6 | uint8 wa <: a; 7 | 8 | always { 9 | a = wa + 1; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /tests/error_checks/combloop15.si: -------------------------------------------------------------------------------- 1 | unit inc(input uint8 i,output! uint8 o) 2 | { // unregistered output ^^ 3 | always { 4 | o = i + 1; 5 | } 6 | } 7 | // main unit 8 | unit main(output uint8 leds) 9 | { 10 | inc i0(o :> i0.i); 11 | // FIXME: this works and should not, combcycle 12 | 13 | always { 14 | __display("i0.o:%d",i0.o); 15 | } 16 | } -------------------------------------------------------------------------------- /tests/error_checks/combloop9.si: -------------------------------------------------------------------------------- 1 | unit inc(input uint8 i,output! uint8 o) 2 | { // unregistered output ^^ 3 | always { 4 | o = i + 1; 5 | } 6 | } 7 | // main unit 8 | unit main(output uint8 leds) 9 | { 10 | inc i0(i <: i0.o, o :> i0.i); 11 | // FIXME: this works and should not, combcycle 12 | 13 | always { 14 | __display("i0.o:%d",i0.o); 15 | } 16 | } -------------------------------------------------------------------------------- /tests/error_checks/cyclic_incl1.si: -------------------------------------------------------------------------------- 1 | $include('cyclic_incl2.si') 2 | -------------------------------------------------------------------------------- /tests/error_checks/cyclic_incl2.si: -------------------------------------------------------------------------------- 1 | $include('cyclic_incl1.si') 2 | -------------------------------------------------------------------------------- /tests/error_checks/dupl1.si: -------------------------------------------------------------------------------- 1 | algorithm main( 2 | input int1 rst, 3 | output int8 led 4 | ) 5 | { 6 | int8 myled = 0; 7 | 8 | subroutine rst(input int1 a,output int1 b) 9 | { 10 | a = b; 11 | } 12 | 13 | led := myled; 14 | 15 | } 16 | -------------------------------------------------------------------------------- /tests/error_checks/dupl2.si: -------------------------------------------------------------------------------- 1 | algorithm main( 2 | input int1 rst, 3 | output int8 led 4 | ) 5 | { 6 | int8 myled = 0; 7 | 8 | bram uint8 myled[] = {1,2}; 9 | 10 | led := myled; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /tests/error_checks/dupl3.si: -------------------------------------------------------------------------------- 1 | algorithm main( 2 | input int1 rst, 3 | output int8 led 4 | ) 5 | { 6 | int8 a = 0; 7 | 8 | subroutine subtest(input int1 a,output int1 b) 9 | { 10 | a = b; 11 | } 12 | 13 | led := myled; 14 | 15 | } 16 | -------------------------------------------------------------------------------- /tests/error_checks/dupl4.si: -------------------------------------------------------------------------------- 1 | algorithm main( 2 | input int1 rst, 3 | output int8 led 4 | ) 5 | { 6 | int8 a = 0; 7 | int8 a = 0; 8 | 9 | led := a; 10 | 11 | } 12 | -------------------------------------------------------------------------------- /tests/error_checks/fwd_jumps.si: -------------------------------------------------------------------------------- 1 | 2 | algorithm main(output int8 led) 3 | { 4 | uint8 a = 1; 5 | 6 | goto foo; 7 | a = 2; 8 | goto foo; 9 | a = 3; 10 | b = 5; 11 | goto foo; 12 | led = b; 13 | 14 | } 15 | -------------------------------------------------------------------------------- /tests/error_checks/inoutshdw1.si: -------------------------------------------------------------------------------- 1 | algorithm main(input int8 a,output int8 c) 2 | { 3 | int6 a = 6b111000; 4 | int2 b = 2b10; 5 | int10 c = 0; 6 | c := {b,a,2b11}; 7 | } -------------------------------------------------------------------------------- /tests/error_checks/io1.si: -------------------------------------------------------------------------------- 1 | 2 | algorithm test(input int8 a,output int8 v) 3 | { 4 | 5 | } 6 | 7 | algorithm main(output int8 led) 8 | { 9 | test t0; 10 | 11 | t1.a = 0; 12 | } 13 | -------------------------------------------------------------------------------- /tests/error_checks/io2.si: -------------------------------------------------------------------------------- 1 | 2 | algorithm test(input int8 a,output int8 v) 3 | { 4 | 5 | } 6 | 7 | algorithm main(output int8 led) 8 | { 9 | test t0; 10 | int8 b = 0; 11 | 12 | t0.v = b; 13 | } 14 | -------------------------------------------------------------------------------- /tests/error_checks/io3.si: -------------------------------------------------------------------------------- 1 | 2 | algorithm test(input int8 a,output int8 v) 3 | { 4 | 5 | } 6 | 7 | algorithm main(output int8 led) 8 | { 9 | test t0; 10 | int8 b = 0; 11 | 12 | b = t0.a; 13 | } 14 | -------------------------------------------------------------------------------- /tests/error_checks/io4.si: -------------------------------------------------------------------------------- 1 | 2 | algorithm test(input int8 a,output int8 v) 3 | { 4 | 5 | } 6 | 7 | algorithm main(output int8 led) 8 | { 9 | int8 c = 0; 10 | test t0(a <: c); 11 | int8 b = 0; 12 | 13 | t0.a = b; 14 | } 15 | -------------------------------------------------------------------------------- /tests/error_checks/io5.si: -------------------------------------------------------------------------------- 1 | 2 | algorithm test(inout int8 a,output int8 v) 3 | { 4 | 5 | } 6 | 7 | algorithm main(output int8 led) 8 | { 9 | test t0; 10 | int8 b = 0; 11 | 12 | t0.a = b; 13 | } 14 | -------------------------------------------------------------------------------- /tests/error_checks/io6.si: -------------------------------------------------------------------------------- 1 | 2 | algorithm test(inout int8 a,output int8 v) 3 | { 4 | 5 | } 6 | 7 | algorithm main(output int8 led) 8 | { 9 | test t0; 10 | 11 | t0.a.c = b; 12 | } 13 | -------------------------------------------------------------------------------- /tests/error_checks/no_init.si: -------------------------------------------------------------------------------- 1 | 2 | algorithm main(output int8 led) 3 | { 4 | int8 tmp; // missing init TODO clearer error message 5 | } 6 | -------------------------------------------------------------------------------- /tests/error_checks/pip1.si: -------------------------------------------------------------------------------- 1 | algorithm main(output int8 led) 2 | { 3 | int8 a = 0; 4 | int8 b = 0; 5 | int8 c = 0; 6 | 7 | a = 2; 8 | 9 | -> 10 | 11 | { 12 | b = a; 13 | c = a; 14 | -> 15 | b = 3; 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /tests/error_checks/pipeline3.si: -------------------------------------------------------------------------------- 1 | unit main(output uint8 leds) 2 | { 3 | 4 | uint8 a = 0; 5 | 6 | always { 7 | 8 | a = a + 1; 9 | 10 | -> 11 | 12 | if (a[0,1]) { 13 | stall; 14 | } 15 | 16 | -> 17 | 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /tests/error_checks/pipeline4.si: -------------------------------------------------------------------------------- 1 | 2 | algorithm main(output uint8 leds) 3 | { 4 | 5 | while (1) { 6 | 7 | { 8 | 9 | } -> { 10 | 11 | } 12 | 13 | if (1) { break; } // cannot break in pipeline stage 14 | // (this is in the last piepline stage, see CL0003) 15 | 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /tests/error_checks/pipfsm1.si: -------------------------------------------------------------------------------- 1 | unit main(output uint8 leds) 2 | { 3 | 4 | always { 5 | 6 | { 7 | 8 | } -> { 9 | 10 | ++: // forbidden here 11 | 12 | } 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /tests/error_checks/repeat1.si: -------------------------------------------------------------------------------- 1 | algorithm main(output int8 led) 2 | { 3 | int8 v[4] = {0,0,0,0}; 4 | 2x { 5 | v[__id] = __id; 6 | 2x { 7 | v[__id] = __id; 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /tests/error_checks/shdw1.si: -------------------------------------------------------------------------------- 1 | unit main(output uint8 leds) 2 | { 3 | uint8 a(0); 4 | uint10 a = 0; 5 | } -------------------------------------------------------------------------------- /tests/error_checks/shdw6.si: -------------------------------------------------------------------------------- 1 | unit main(output uint8 leds) 2 | { 3 | 4 | algorithm 5 | { 6 | uint10 a = 20; 7 | uint10 a = 33; 8 | 9 | __display("a = %d",a); 10 | 11 | } 12 | } -------------------------------------------------------------------------------- /tests/error_checks/shdw7.si: -------------------------------------------------------------------------------- 1 | algorithm foo() 2 | { 3 | 4 | } 5 | 6 | unit main(output uint8 leds) 7 | { 8 | foo a; 9 | 10 | algorithm 11 | { 12 | { 13 | uint10 a = 20; 14 | __display("a = %d",a); 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /tests/error_checks/states1.si: -------------------------------------------------------------------------------- 1 | 2 | algorithm main(output int8 led) 3 | { 4 | 5 | int10 a = 0; 6 | 7 | here0: 8 | a = 1; 9 | 10 | here1: 11 | a = 2; 12 | 13 | here0: 14 | a = 3; 15 | 16 | } 17 | -------------------------------------------------------------------------------- /tests/error_checks/sub1.si: -------------------------------------------------------------------------------- 1 | algorithm main(output int8 led) 2 | { 3 | int8 a = 0; 4 | int8 b = 0; 5 | int8 c = 0; 6 | 7 | subroutine test0(input int8 p0,output int8 o0) { // missing permission: ,reads a): 8 | o0 = p0 + a; 9 | return; 10 | } 11 | 12 | (led) <- test0 <- (b); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /tests/error_checks/sub2.si: -------------------------------------------------------------------------------- 1 | algorithm main(output int8 led) 2 | { 3 | int8 a = 0; 4 | int8 b = 0; 5 | int8 c = 0; 6 | 7 | subroutine test0(input int8 p0,output int8 o0) { // missing permission: ,writes a): 8 | a = p0 + 1; 9 | o0 = p0; 10 | return; 11 | } 12 | 13 | (led) <- test0 <- (b); 14 | 15 | } 16 | -------------------------------------------------------------------------------- /tests/error_checks/sub3.si: -------------------------------------------------------------------------------- 1 | algorithm main(output int8 led) 2 | { 3 | int8 a = 0; 4 | int8 b = 0; 5 | int8 c = 0; 6 | 7 | subroutine test0(input int8 p0,output int8 o0,reads a) { // missing permission: ,readwrites a): 8 | o0 = a + 1; 9 | a = p0; 10 | return; 11 | } 12 | 13 | (led) <- test0 <- (b); 14 | 15 | } 16 | -------------------------------------------------------------------------------- /tests/error_checks/sub4.si: -------------------------------------------------------------------------------- 1 | algorithm main(output int8 led) 2 | { 3 | int8 a = 0; 4 | 5 | subroutine test0(input int8 p0,output int8 o0) { 6 | o0 = p0 + 1; 7 | return; 8 | } 9 | 10 | test0 <- (a); // forbidden asynch call on subroutine 11 | 12 | } 13 | -------------------------------------------------------------------------------- /tests/error_checks/sub6.si: -------------------------------------------------------------------------------- 1 | algorithm test(input int8 p0,output int8 o0) 2 | { 3 | o0 = p0 + 10; 4 | } 5 | 6 | algorithm main(output int8 led) 7 | { 8 | int8 a = 0; 9 | test test0; 10 | 11 | subroutine test0(input int8 p0,output int8 o0) { 12 | o0 = p0 + 1; 13 | return; 14 | } 15 | 16 | (led) <- test0 <- (a); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /tests/error_checks/sub7.si: -------------------------------------------------------------------------------- 1 | algorithm main(output uint8 leds) 2 | { 3 | 4 | subroutine subB(input uint8 i,output uint8 o) {} 5 | 6 | subroutine subA(input uint8 i,output uint8 o) 7 | { 8 | (o) <- subB <- (i); 9 | } 10 | 11 | subroutine subB(input uint8 i,output uint8 o) 12 | { 13 | o = i; 14 | } 15 | 16 | (leds) <- subA <- (0); 17 | } 18 | -------------------------------------------------------------------------------- /tests/error_checks/sub_vname.si: -------------------------------------------------------------------------------- 1 | 2 | unit main(output uint8 leds) 3 | { 4 | 5 | algorithm { 6 | 7 | subroutine sub(input uint8 x) { 8 | uint8 x(20); /// overlap with input name was not detected 9 | __display("x = %d",x); 10 | } 11 | 12 | () <- sub <- (100); 13 | 14 | } 15 | 16 | } -------------------------------------------------------------------------------- /tests/error_checks/tbl1.si: -------------------------------------------------------------------------------- 1 | 2 | algorithm main(output int8 led) 3 | { 4 | int8 tbl[2]; // missing initializer 5 | } 6 | -------------------------------------------------------------------------------- /tests/error_checks/tbl2.si: -------------------------------------------------------------------------------- 1 | 2 | algorithm main(output int8 led) 3 | { 4 | int8 tbl[3] = {0,1}; // size mismatches initializer 5 | } 6 | -------------------------------------------------------------------------------- /tests/error_checks/tbl3.si: -------------------------------------------------------------------------------- 1 | 2 | algorithm main(output int8 led) 3 | { 4 | int8 tbl[]; // missing size and initializer 5 | } 6 | -------------------------------------------------------------------------------- /tests/error_checks/tbl4.si: -------------------------------------------------------------------------------- 1 | 2 | algorithm main(output int8 led) 3 | { 4 | int8 tbl[-1] = {0,0}; // negative size 5 | } 6 | -------------------------------------------------------------------------------- /tests/error_checks/tbl5.si: -------------------------------------------------------------------------------- 1 | 2 | algorithm main(output int8 led) 3 | { 4 | int8 tbl = 0; // declared, but not a table 5 | 6 | tbl[1] = 1; 7 | } 8 | -------------------------------------------------------------------------------- /tests/error_checks/tbl6.si: -------------------------------------------------------------------------------- 1 | algorithm main() 2 | { 3 | uint8 b = 0; 4 | uint1 a = 0; 5 | a = b[7]; // should trigger an error 6 | } 7 | -------------------------------------------------------------------------------- /tests/error_checks/track1.si: -------------------------------------------------------------------------------- 1 | unit main(output uint8 leds) 2 | { 3 | 4 | algorithm { 5 | 6 | uint8 n = 0; 7 | 8 | uint8 n1 <:: n + 1; // ok 9 | 10 | n = 4; 11 | 12 | uint8 n2 <: n + 2; // not ok (no longer in preambule) 13 | 14 | 15 | } 16 | 17 | } -------------------------------------------------------------------------------- /tests/error_checks/unit_error4.si: -------------------------------------------------------------------------------- 1 | // units, cannot have always and algorithm 2 | unit main(output uint8 leds) 3 | { 4 | uint24 count = 0; 5 | 6 | always { 7 | __display("count = %d",count); 8 | if (count == 15) { __finish(); } 9 | } 10 | 11 | algorithm { 12 | while (1) { 13 | count = count + 1; 14 | } 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /tests/error_checks/unkown_var2.si: -------------------------------------------------------------------------------- 1 | algorithm main( 2 | input int1 rst_n, 3 | output int8 led 4 | ) 5 | { 6 | int1 rst = 0; 7 | 8 | rst = a; 9 | 10 | } 11 | -------------------------------------------------------------------------------- /tests/error_checks/unkown_var3.si: -------------------------------------------------------------------------------- 1 | algorithm main( 2 | input int1 rst_n, 3 | output int8 led 4 | ) 5 | { 6 | int1 rst = 0; 7 | 8 | a = rst; 9 | 10 | } 11 | -------------------------------------------------------------------------------- /tests/error_checks/unkown_var4.si: -------------------------------------------------------------------------------- 1 | algorithm main( 2 | input int1 val, 3 | output int8 led 4 | ) 5 | { 6 | int8 a = 0; 7 | int8 b = 0; 8 | 9 | a := 1 + (foo << 2); 10 | 11 | } 12 | -------------------------------------------------------------------------------- /tests/error_checks/unkown_var5.si: -------------------------------------------------------------------------------- 1 | algorithm main( 2 | input int1 val, 3 | output int8 led 4 | ) 5 | { 6 | int8 a = 0; 7 | int8 b = 0; 8 | 9 | if (c == 0) { 10 | b = a + 2; 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /tests/error_checks/wire1.si: -------------------------------------------------------------------------------- 1 | algorithm main(output uint8 leds) 2 | { 3 | uint8 w <: bar; 4 | w = 1; // should trigger an error 5 | led = w; 6 | } -------------------------------------------------------------------------------- /tests/error_checks/wire2.si: -------------------------------------------------------------------------------- 1 | algorithm main(output uint8 leds) 2 | { 3 | uint8 a = 1; 4 | uint8 b = 2; 5 | uint8 w <: a; 6 | uint9 a_plus_b <: w + b; 7 | 8 | a = 3; 9 | b = 5; 10 | ++: 11 | a = a_plus_b; 12 | 13 | } 14 | -------------------------------------------------------------------------------- /tests/error_checks/wire3.si: -------------------------------------------------------------------------------- 1 | algorithm main(output uint8 leds) 2 | { 3 | uint8 a = 1; 4 | uint8 b = 2; 5 | 6 | a = 3; 7 | b = 5; 8 | 9 | ++: 10 | 11 | uint9 a_plus_b <: w + b; 12 | a = a_plus_b; 13 | 14 | } 15 | -------------------------------------------------------------------------------- /tests/first_example.si: -------------------------------------------------------------------------------- 1 | algorithm main(output int8 leds) 2 | { 3 | 4 | uint28 counter = 0; // a 28 bits unsigned integer 5 | leds := counter[20,8]; // LEDs track the 8 most significant bits 6 | while (counter != 255) { // while (1), limited for unit testing 7 | counter = counter + 1; // count 8 | } 9 | 10 | } 11 | -------------------------------------------------------------------------------- /tests/fsm1.si: -------------------------------------------------------------------------------- 1 | algorithm main(output uint8 leds) 2 | { 3 | uint1 a = 0; 4 | 5 | leds = 1; 6 | ++: 7 | if (a) { 8 | leds = 2; 9 | } else { 10 | leds = 3; 11 | } 12 | ++: 13 | leds = 4; 14 | 15 | } -------------------------------------------------------------------------------- /tests/globsub1.si: -------------------------------------------------------------------------------- 1 | subroutine inc(input uint8 i,output uint8 o) 2 | { 3 | o = i + 1; 4 | return; 5 | } 6 | 7 | algorithm main(output uint8 leds) 8 | { 9 | uint8 a = 0; 10 | 11 | (a) <- inc <- (a); 12 | 13 | __display("a = %d",a); 14 | } 15 | -------------------------------------------------------------------------------- /tests/goto1.si: -------------------------------------------------------------------------------- 1 | algorithm main(output uint8 leds) 2 | { 3 | 4 | int8 a = 0; 5 | 6 | a = 1; 7 | goto g2; 8 | g1: 9 | a = 2; 10 | g2: 11 | a = 3; 12 | 13 | } -------------------------------------------------------------------------------- /tests/goto2.si: -------------------------------------------------------------------------------- 1 | algorithm main(output uint8 leds) 2 | { 3 | 4 | int8 a = 0; 5 | 6 | a = 1; 7 | if (a == 2) { goto g2; } 8 | a = 3; 9 | ++: 10 | a = 10; 11 | g2: 12 | a = 100; 13 | 14 | } -------------------------------------------------------------------------------- /tests/goto3.si: -------------------------------------------------------------------------------- 1 | algorithm main(output uint8 leds) 2 | { 3 | 4 | int8 a = 0; 5 | 6 | a = 1; 7 | if (a == 2) { goto g2; } 8 | a = 103; 9 | g2: 10 | a = 3; 11 | ++: 12 | a = 10; 13 | unused: 14 | a = 20; 15 | a = 30; 16 | while (a < 10) { } 17 | g3: 18 | a = 100; 19 | a = 101; 20 | goto g4; 21 | a = 102; 22 | ++: 23 | g4: 24 | a = 103; 25 | 26 | } -------------------------------------------------------------------------------- /tests/if1.si: -------------------------------------------------------------------------------- 1 | algorithm main() 2 | { 3 | 4 | int8 data = 0; 5 | int8 a = 0; 6 | int8 b = 1; 7 | 8 | data = 1; 9 | a = 0; 10 | b = 1; 11 | 12 | if (data == 0) { 13 | a = 1; 14 | if (b == 0) { 15 | a = 3; 16 | } else { 17 | a = 4; 18 | } 19 | } else { 20 | a = 2; 21 | } 22 | 23 | } -------------------------------------------------------------------------------- /tests/if3.si: -------------------------------------------------------------------------------- 1 | algorithm main(output uint8 leds) 2 | { 3 | 4 | int8 data = 0; 5 | int8 a = 0; 6 | int8 b = 1; 7 | 8 | if (data == 0) { 9 | a = 1; 10 | if (b == 0) { 11 | a = 3; 12 | } 13 | } else { 14 | a = 2; 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /tests/if_cycle_after_4.si: -------------------------------------------------------------------------------- 1 | algorithm main(output uint8 leds) 2 | { 3 | uint8 test = 8; 4 | uint1 C1=0; 5 | uint1 C2=0; 6 | uint1 C3=0; 7 | 8 | /// case A 9 | while (test == 0) { 10 | 11 | if (C1) { break; } 12 | if (C2) { break; } 13 | if (C3) { break; } 14 | 15 | __display("here"); 16 | 17 | } 18 | 19 | out: 20 | __display("out"); 21 | 22 | } -------------------------------------------------------------------------------- /tests/if_cycle_after_5.si: -------------------------------------------------------------------------------- 1 | algorithm main(output uint8 leds) 2 | { 3 | uint8 test = 8; 4 | uint1 C1=0; 5 | 6 | if (C1) { 7 | __display("1"); 8 | ++: 9 | __display("2"); 10 | ++: 11 | __display("3"); 12 | } else { 13 | __display("else"); 14 | } 15 | 16 | __display("bottom"); 17 | 18 | } -------------------------------------------------------------------------------- /tests/inc.si: -------------------------------------------------------------------------------- 1 | algorithm main() 2 | { 3 | bram uint8 test[] = { 4 | $include('bram_data.inc') 5 | }; 6 | 7 | ++: 8 | 9 | __display("boo"); 10 | 11 | } -------------------------------------------------------------------------------- /tests/inputff.si: -------------------------------------------------------------------------------- 1 | algorithm alg(input uint8 i,output uint8 o) 2 | { 3 | always { o = i; } 4 | } 5 | 6 | algorithm main(output uint8 leds) 7 | { 8 | alg a; 9 | 10 | always { a.i = 2; } 11 | 12 | __display("alg.o = %d",a.o); 13 | } 14 | -------------------------------------------------------------------------------- /tests/issues/108_pmod_2.si: -------------------------------------------------------------------------------- 1 | algorithm main(output uint5 leds, inout uint8 pmod) { 2 | uint3 ctr = 4; 3 | uint1 pmod_bit1 = uninitialized; 4 | 5 | pmod.oenable := 8b11111111; 6 | // pmod.o = 8b11111111; // does not work, behavior after alg is done is undefined 7 | pmod.o := 8b11111111; // works fine 8 | } 9 | -------------------------------------------------------------------------------- /tests/issues/109_always_after.si: -------------------------------------------------------------------------------- 1 | algorithm main(output uint8 leds) 2 | { 3 | 4 | uint8 test(0); 5 | uint8 a(33); 6 | 7 | always_before { 8 | leds = test; 9 | } 10 | 11 | always_after { 12 | test = a + 1; 13 | } 14 | 15 | while (1) { 16 | a = a + 1; 17 | } 18 | } 19 | 20 | -------------------------------------------------------------------------------- /tests/issues/109_always_after_2.si: -------------------------------------------------------------------------------- 1 | algorithm main(output uint8 leds) 2 | { 3 | uint8 a = 0; 4 | 5 | always_before { 6 | leds = a; 7 | } 8 | 9 | always_after { 10 | a = a + 1; 11 | } 12 | 13 | while (1) { } 14 | } 15 | 16 | -------------------------------------------------------------------------------- /tests/issues/113_always_main.si: -------------------------------------------------------------------------------- 1 | algorithm main(output uint8 leds) 2 | { 3 | always { 4 | uint24 cnt(0); 5 | 6 | leds[0,8] = cnt[16,8]; 7 | cnt = cnt + 1; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /tests/issues/113_main_no_fsm.si: -------------------------------------------------------------------------------- 1 | algorithm main(output uint8 leds) 2 | { 3 | leds := 5; 4 | } 5 | -------------------------------------------------------------------------------- /tests/issues/120_wire_combloop_5.si: -------------------------------------------------------------------------------- 1 | // expects [ FAILED ] 2 | 3 | algorithm main(output uint8 leds) 4 | { 5 | 6 | uint8 v(0); 7 | uint8 t <: v + 1; 8 | 9 | ++: 10 | leds = t; 11 | v = v + 1; 12 | __display("leds %d v %d t %d",leds,v,t); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /tests/issues/121_wires.si: -------------------------------------------------------------------------------- 1 | algorithm foo(input uint8 i,output uint8 o) 2 | { 3 | o = i; 4 | } 5 | 6 | algorithm main(output uint8 leds) 7 | { 8 | 9 | uint8 i(0); 10 | uint1 a <: i == 1; 11 | uint8 b <: a + 1; 12 | uint8 c(0); 13 | 14 | foo f(i <: b, o :> c); 15 | 16 | __display("c %b",c); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /tests/issues/129_assign_tracker.si: -------------------------------------------------------------------------------- 1 | // expects [ FAILED ] 2 | 3 | algorithm main(output uint8 leds) { 4 | 5 | uint1 bound <: 1; 6 | 7 | bound = 1; 8 | 9 | } 10 | -------------------------------------------------------------------------------- /tests/issues/130_literal_ternary_condition.si: -------------------------------------------------------------------------------- 1 | algorithm main(output uint$NUM_LEDS$ leds) { 2 | uint1 b = 0; 3 | 4 | b = 2b00 ? 1b1 : 1b0; 5 | } 6 | -------------------------------------------------------------------------------- /tests/issues/132_bound_expr.si: -------------------------------------------------------------------------------- 1 | algorithm main(output uint$NUM_LEDS$ leds = 0) 2 | { 3 | uint8 b(111); 4 | uint8 a <: b + 1; 5 | 6 | b = 0; // removing this makes everyone agree 7 | leds = a; 8 | b = 28; 9 | 10 | // Q: is the value of leds 1, or 29 ? 11 | 12 | ++: 13 | __display("======> %d", leds); 14 | 15 | } 16 | -------------------------------------------------------------------------------- /tests/issues/133_state_0.si: -------------------------------------------------------------------------------- 1 | algorithm main(output uint$NUM_LEDS$ leds = 0) 2 | { 3 | uint8 b(111); 4 | 5 | uint8 a(0); 6 | a := b + 1; 7 | 8 | if (reset) { __display("in reset %d",b); } // we can see state 0 executing while in reset... 9 | 10 | leds = a; 11 | b = 0; 12 | 13 | ++: 14 | __display("======> %d <<< should be 112", leds); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /tests/issues/135_array.si: -------------------------------------------------------------------------------- 1 | algorithm main(output uint8 leds) { 2 | uint8 values[3] = { 0, 1, 2 }; 3 | 4 | values[0] = 1; 5 | values[1] = 2; 6 | values[2] = 3; 7 | 8 | leds = 1; 9 | 10 | __display("%d | %d | %d", values[0], values[1], values[2]); 11 | } 12 | -------------------------------------------------------------------------------- /tests/issues/145_repbits_concat.si: -------------------------------------------------------------------------------- 1 | // expects [ FAILED ] 2 | 3 | algorithm main(output uint8 leds) { 4 | __display("%d", {{8{1b1}}, 5b11111}); // correct 5 | __display("%d", {8{1b1}, 5b11111}); // syntax error 6 | } 7 | -------------------------------------------------------------------------------- /tests/issues/151_inalg.si: -------------------------------------------------------------------------------- 1 | // expects [ FAILED ] 2 | 3 | group gr { 4 | uint8 data = 0 5 | } 6 | 7 | algorithm f(gr gio { input data }) { 8 | gio.data := 0; // cannot write to input 9 | } 10 | 11 | algorithm main(output uint8 leds) { 12 | gr gio; 13 | f f(gio <:> gio); 14 | } 15 | -------------------------------------------------------------------------------- /tests/issues/152_ff_tmp.si: -------------------------------------------------------------------------------- 1 | algorithm main(output uint8 leds) 2 | { 3 | 4 | uint1 foo = 0; 5 | uint1 x <: foo; 6 | 7 | foo := 5; 8 | 9 | ++: 10 | 11 | leds = x; 12 | 13 | } 14 | -------------------------------------------------------------------------------- /tests/issues/189_bfield.si: -------------------------------------------------------------------------------- 1 | bitfield Node { 2 | uint16 right, 3 | uint16 left 4 | } 5 | 6 | algorithm main(output uint8 leds) 7 | { 8 | uint32 data = Node(left=16hffff,right=16hab34); 9 | 10 | __display("%x", Node(data).right[8,8] ); 11 | } 12 | -------------------------------------------------------------------------------- /tests/issues/18_empty_preproc_line.si: -------------------------------------------------------------------------------- 1 | $$ 2 | algorithm main(output uint8 leds) 3 | { 4 | leds = 1; 5 | } 6 | -------------------------------------------------------------------------------- /tests/issues/196_xor.si: -------------------------------------------------------------------------------- 1 | algorithm main(output uint8 leds) 2 | { 3 | uint7 init(127); 4 | 5 | __display("here 0"); 6 | if ( ^init ) { 7 | __display("here 1"); 8 | } 9 | __display("here 2"); 10 | } 11 | -------------------------------------------------------------------------------- /tests/issues/228_bram.si: -------------------------------------------------------------------------------- 1 | unit main(output uint8 leds) { 2 | algorithm { 3 | bram uint8 table[8] = {0,1,2,3,4,5,6,7}; 4 | uint8 n = 0; 5 | table.addr = n; 6 | while (n != 8) { 7 | __display("[%d] = %d",n,table.rdata); 8 | n = n + 1; 9 | table.addr = n; 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /tests/issues/247_fsm.si: -------------------------------------------------------------------------------- 1 | algorithm main(output uint8 leds) 2 | { 3 | uint8 test = 255; 4 | while (test != 0) { __display("here"); test = test - 1; } 5 | } 6 | -------------------------------------------------------------------------------- /tests/issues/257_break.si: -------------------------------------------------------------------------------- 1 | 2 | algorithm main(output uint8 leds) 3 | { 4 | 5 | while (1) { 6 | 7 | { 8 | 9 | } -> { 10 | 11 | } 12 | 13 | if (1) { break; } 14 | 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /tests/issues/25_comment_preproc.si: -------------------------------------------------------------------------------- 1 | //$$TEST=0 2 | 3 | algorithm main(output uint8 leds) 4 | { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /tests/issues/36_tblpart.si: -------------------------------------------------------------------------------- 1 | algorithm main(output uint8 leds) 2 | { 3 | 4 | uint8 tbl[4] = {8b11110000,8b10100110,8b10110010,8b00110011}; 5 | 6 | __display("%b",tbl[1][6,2]); 7 | 8 | } -------------------------------------------------------------------------------- /tests/issues/54_d_q.si: -------------------------------------------------------------------------------- 1 | 2 | algorithm bar(input uint8 i, output uint8 o) 3 | { 4 | o = i; 5 | } 6 | 7 | algorithm main(output uint8 leds,input uint2 v) 8 | { 9 | uint8 a = 8b10101010; 10 | uint8 b = 2; 11 | 12 | bar br; 13 | 14 | while (1) { 15 | 16 | a[2,2] = v; 17 | // a = v; 18 | (b) <- br <- (a); 19 | 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /tests/issues/82_bitfield_table.si: -------------------------------------------------------------------------------- 1 | bitfield test{ 2 | uint1 one, 3 | uint7 seven 4 | } 5 | 6 | algorithm main(output uint8 leds) 7 | { 8 | uint8 tbl[16] = {pad(1)}; 9 | ++: 10 | tbl[0][1,7] = 1; // ok 11 | ++: 12 | test(tbl[0]).seven = 1; // failed 13 | 14 | } 15 | -------------------------------------------------------------------------------- /tests/issues/Makefile: -------------------------------------------------------------------------------- 1 | 2 | .DEFAULT: $@.si.lpp 3 | silice-make.py -s $@.si -b verilator -p basic -o BUILD_$(subst :,_,$@) $(ARGS) 4 | 5 | clean: 6 | rm -rf BUILD_* 7 | -------------------------------------------------------------------------------- /tests/issues/Makefile.icarus: -------------------------------------------------------------------------------- 1 | 2 | .DEFAULT: $@.si.lpp 3 | silice-make.py -s $@.si -b icarus -p basic -o BUILD_$(subst :,_,$@) 4 | 5 | clean: 6 | rm -rf BUILD_* 7 | -------------------------------------------------------------------------------- /tests/issues/Makefile.techgraph: -------------------------------------------------------------------------------- 1 | 2 | .DEFAULT: $@.si.lpp 3 | silice-make.py -s $@.si -b techgraph -p basic -o BUILD_$(subst :,_,$@) 4 | 5 | clean: 6 | rm -rf BUILD_* 7 | -------------------------------------------------------------------------------- /tests/led2.si: -------------------------------------------------------------------------------- 1 | algorithm main(output int8 leds) 2 | { 3 | int22 data = 0; 4 | int8 myled = 0; 5 | 6 | leds := myled; 7 | 8 | data = 1; 9 | myled = 0; 10 | 11 | start: 12 | 13 | data = data + 1; 14 | if (data == 0) { 15 | myled = myled << 1; 16 | if (myled == 0) { 17 | myled = 1; 18 | } 19 | } 20 | 21 | goto start; 22 | } 23 | -------------------------------------------------------------------------------- /tests/module1.si: -------------------------------------------------------------------------------- 1 | 2 | import('../projects/common/ice40_sb_io_inout.v') 3 | 4 | unit main(output uint8 leds,inout uint1 io) 5 | { 6 | 7 | uint1 one(1); uint1 bla(0); uint1 read(0); 8 | 9 | sb_io_inout _(clock <: clock, oe <: one, out <: bla, in :> read, pin <:> io); 10 | 11 | } 12 | -------------------------------------------------------------------------------- /tests/noname1.si: -------------------------------------------------------------------------------- 1 | algorithm test( 2 | input auto a, 3 | output sameas(a) b, 4 | input sameas(a) c, 5 | ) { 6 | b := a + c; 7 | } 8 | 9 | algorithm main(output int8 leds) 10 | { 11 | uint4 w <: 0; 12 | test _(a <: w, b :> leds, c <: w); 13 | uint4 w2 <: 5; 14 | sameas(leds) tmp=0; 15 | test _(a <: w2, b :> tmp, c <: w); 16 | } 17 | -------------------------------------------------------------------------------- /tests/nonsynth1.si: -------------------------------------------------------------------------------- 1 | unit main(output uint8 leds) 2 | { 3 | algorithm { 4 | __display("hello world"); 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /tests/onehot1.si: -------------------------------------------------------------------------------- 1 | 2 | algorithm main( 3 | output uint8 leds 4 | ) 5 | { 6 | leds = 0; 7 | ++: 8 | leds = 1; 9 | ++: 10 | leds = 2; 11 | ++: 12 | leds = 3; 13 | 14 | } 15 | -------------------------------------------------------------------------------- /tests/param1.si: -------------------------------------------------------------------------------- 1 | algorithm test( 2 | input uint4 a, 3 | output sameas(a) b, 4 | input sameas(a) c, 5 | ) { 6 | b := a + c; 7 | } 8 | 9 | algorithm main(output int8 leds) 10 | { 11 | uint4 w <: 0; 12 | test t(a <: w, b :> leds, c <: w); 13 | } 14 | -------------------------------------------------------------------------------- /tests/param2.si: -------------------------------------------------------------------------------- 1 | algorithm test( 2 | input auto a, 3 | output sameas(a) b, 4 | input sameas(a) c, 5 | ) { 6 | b := a + c; 7 | } 8 | 9 | algorithm main(output int8 leds) 10 | { 11 | uint4 w <: 0; 12 | test t(a <: w, b :> leds, c <: w); 13 | } 14 | -------------------------------------------------------------------------------- /tests/perms1.si: -------------------------------------------------------------------------------- 1 | unit main(output uint8 leds) 2 | { 3 | 4 | bram uint8 test[16] = {pad(111)}; 5 | 6 | algorithm { 7 | 8 | subroutine sub(readwrites test) 9 | { 10 | test.addr = 0; 11 | ++: 12 | __display("%d",test.rdata); 13 | } 14 | 15 | () <- sub <- (); 16 | 17 | } 18 | 19 | } -------------------------------------------------------------------------------- /tests/pipeline23.si: -------------------------------------------------------------------------------- 1 | algorithm main(output uint8 leds) 2 | { 3 | uint32 cycle(0); 4 | uint8 v = cycle; // should be detected as trickling 5 | 6 | __display("[cycle %d] ==== in:%d",cycle,v); 7 | 8 | -> 9 | -> 10 | -> 11 | -> 12 | __display("[cycle %d] ==== result:%d",cycle,v); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /tests/preproc1.si: -------------------------------------------------------------------------------- 1 | algorithm test( 2 | input int8 a, 3 | input int8 b 4 | ) { 5 | 6 | $$ for i=0,3 do 7 | int8 v_$i$ = $i*10$; 8 | $$end 9 | 10 | } 11 | 12 | unit main(output uint8 leds) {} 13 | -------------------------------------------------------------------------------- /tests/preproc10.si: -------------------------------------------------------------------------------- 1 | circuitry circ(input a,output b) 2 | { 3 | $$print('widthof(a) = ' .. widthof('a')) 4 | b = 100 + a; 5 | } 6 | 7 | unit main(output uint8 leds) 8 | { 9 | uint8 m(123); 10 | uint8 n(0); 11 | algorithm { 12 | (n) = circ(m); 13 | __display("return = %d",n); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /tests/preproc11.si: -------------------------------------------------------------------------------- 1 | circuitry circ(input a,output b) 2 | { 3 | $$print('N = ' .. N) 4 | b = $N$ + a; 5 | } 6 | 7 | unit main(output uint8 leds) 8 | { 9 | uint8 m(123); 10 | uint8 n(0); 11 | algorithm { 12 | (n) = circ(m); 13 | __display("return = %d",n); 14 | (n) = circ(m); 15 | __display("return = %d",n); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /tests/preproc13.si: -------------------------------------------------------------------------------- 1 | circuitry circ2(input a,output b) 2 | { 3 | b = a; 4 | } 5 | 6 | circuitry circ1(input a,output b) 7 | { 8 | (b) = circ2(a+100); 9 | } 10 | 11 | unit main(output uint8 leds) 12 | { 13 | uint8 m(5); 14 | uint8 n(0); 15 | algorithm { 16 | (n) = circ1(8d10); 17 | __display("return = %d",n); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /tests/preproc5.si: -------------------------------------------------------------------------------- 1 | 2 | $$ str = 'unit test(output uint8 v) { v := 8b10101010; }' 3 | //test 4 | 5 | $str$ //blabli 6 | 7 | unit main(output uint8 leds) 8 | { 9 | test _(v :> leds); 10 | } 11 | -------------------------------------------------------------------------------- /tests/preproc8.si: -------------------------------------------------------------------------------- 1 | unit test3( 2 | input auto i, 3 | output sameas(i) o) 4 | { 5 | $$print('********* i:' .. widthof('i') .. ' o:' .. widthof('o')) 6 | always { 7 | o = i + 1; 8 | } 9 | } 10 | 11 | unit main(output uint8 leds) 12 | { 13 | uint8 a(0); 14 | uint4 b(0); 15 | 16 | test3 t0(i <: a,o :> b); 17 | 18 | algorithm {} 19 | } 20 | -------------------------------------------------------------------------------- /tests/rep1.si: -------------------------------------------------------------------------------- 1 | algorithm main(output int8 leds) 2 | { 3 | int8 tbl[8] = {1,2,4,8,16,32,64,128}; 4 | int8 myled = 0; 5 | 6 | leds := myled; 7 | 8 | 8x { 9 | tbl[__id] = __id; 10 | } 11 | 12 | 8x { 13 | if ((__id & 1) == 0) { 14 | tbl[__id] = 0; 15 | } 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /tests/return_in_algorithm.si: -------------------------------------------------------------------------------- 1 | algorithm main(output uint8 leds) { 2 | uint8 cnt = 0; 3 | 4 | while (cnt < 200) { 5 | if (cnt == 156) { 6 | return; 7 | } 8 | 9 | cnt = cnt + 1; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /tests/sameas3.si: -------------------------------------------------------------------------------- 1 | algorithm main(output uint8 leds) 2 | { 3 | sameas(leds) a(0); 4 | 5 | leds = a + 1; 6 | } 7 | -------------------------------------------------------------------------------- /tests/shdw2.si: -------------------------------------------------------------------------------- 1 | unit main(output uint8 leds) 2 | { 3 | 4 | uint8 a(5); 5 | 6 | algorithm 7 | { 8 | uint10 a = 10; 9 | __display("a1 = %d",a); 10 | } 11 | 12 | always_after { 13 | __display("a2 = %d",a); 14 | } 15 | } -------------------------------------------------------------------------------- /tests/shdw3.si: -------------------------------------------------------------------------------- 1 | unit main(output uint8 leds) 2 | { 3 | algorithm 4 | { 5 | uint10 a = 10; 6 | { 7 | uint10 a = 20; 8 | __display("a2 = %d",a); 9 | } 10 | __display("a1 = %d",a); 11 | } 12 | } -------------------------------------------------------------------------------- /tests/shdw4.si: -------------------------------------------------------------------------------- 1 | unit main(output uint8 leds) 2 | { 3 | 4 | algorithm 5 | { 6 | subroutine test() 7 | { 8 | uint10 a = 10; 9 | __display("a1 = %d",a); 10 | 11 | 12 | } 13 | 14 | uint10 a = 20; 15 | __display("a2 = %d",a); 16 | () <- test <- (); 17 | 18 | } 19 | } -------------------------------------------------------------------------------- /tests/shdw5.si: -------------------------------------------------------------------------------- 1 | unit main(output uint8 leds) 2 | { 3 | uint10 a = 20; 4 | 5 | algorithm 6 | { 7 | subroutine test() 8 | { 9 | uint10 a = 10; 10 | __display("a1 = %d",a); 11 | 12 | 13 | } 14 | 15 | __display("a2 = %d",a); 16 | () <- test <- (); 17 | 18 | } 19 | } -------------------------------------------------------------------------------- /tests/sub3.si: -------------------------------------------------------------------------------- 1 | algorithm main(output uint8 leds) 2 | { 3 | int8 a = 0; 4 | int8 v = 0; 5 | 6 | subroutine never_called(input uint8 i,output uint8 o,writes a) 7 | { 8 | a = i; 9 | o = i; 10 | } 11 | 12 | leds = a; 13 | } 14 | -------------------------------------------------------------------------------- /tests/sub4.si: -------------------------------------------------------------------------------- 1 | algorithm main(output uint8 leds) 2 | { 3 | 4 | subroutine subB; // forward declaration 5 | 6 | subroutine subA(input uint8 i,output uint8 o) 7 | { 8 | (o) <- subB <- (i); 9 | } 10 | 11 | subroutine subB(input uint8 i,output uint8 o) 12 | { 13 | o = i + 11; 14 | } 15 | 16 | (leds) <- subA <- (22); 17 | 18 | __display("%d",leds); 19 | } 20 | -------------------------------------------------------------------------------- /tests/subcall3.si: -------------------------------------------------------------------------------- 1 | algorithm main( 2 | output uint8 leds 3 | ) 4 | { 5 | uint1 btn=1; 6 | 7 | subroutine foo(input uint8 a) 8 | { 9 | __display("foo"); 10 | uint8 tmp1 = 3; 11 | tmp1 = a; 12 | } 13 | 14 | uint8 v = 0; 15 | 16 | if (btn) { 17 | () <- foo <- (1); 18 | } 19 | 20 | v = v + 1; 21 | leds = v; 22 | } 23 | -------------------------------------------------------------------------------- /tests/subchain1.si: -------------------------------------------------------------------------------- 1 | algorithm main(output uint8 leds) 2 | { 3 | 4 | subroutine inc(input uint8 a,output uint8 r) 5 | { 6 | r = a; 7 | } 8 | 9 | subroutine foo(input uint8 a,output uint8 r) 10 | { 11 | r = a; 12 | } 13 | 14 | uint8 v = 0; 15 | 16 | (v) <- inc <- (v); 17 | (v) <- foo <- (v); 18 | 19 | } 20 | -------------------------------------------------------------------------------- /tests/subfsm1.si: -------------------------------------------------------------------------------- 1 | 2 | algorithm main(output uint8 leds) 3 | { 4 | 5 | subroutine foo(input uint8 v,output uint8 o) 6 | { 7 | uint8 t = uninitialized; 8 | t = v + 1; 9 | ++: 10 | o = t + 1; 11 | } 12 | 13 | (leds) <- foo <- (100); 14 | 15 | } 16 | -------------------------------------------------------------------------------- /tests/switch1.si: -------------------------------------------------------------------------------- 1 | 2 | algorithm main() 3 | { 4 | 5 | uint8 num = 5; 6 | uint8 res = 0; 7 | 8 | switch (num) { 9 | 10 | case 0: { res = 42; } 11 | case 1: { res = 43; } 12 | default: { res = 64; } 13 | 14 | } 15 | 16 | __display("res = %d",res); 17 | } 18 | -------------------------------------------------------------------------------- /tests/switch2.si: -------------------------------------------------------------------------------- 1 | 2 | algorithm main() 3 | { 4 | 5 | uint8 num = 1; 6 | uint8 res = 0; 7 | 8 | switch (num) { 9 | 10 | case 0: { res = 42; } 11 | default: { goto skip; } 12 | 13 | } 14 | 15 | __display("res = %d",res); 16 | 17 | goto done; 18 | 19 | skip: 20 | 21 | __display("skipped"); 22 | 23 | done: 24 | } 25 | -------------------------------------------------------------------------------- /tests/syntax_errors/test_mismatch.si: -------------------------------------------------------------------------------- 1 | algorithm error(input uint1 b) 2 | { 3 | (m) <- test = (1,2,3); 4 | } 5 | -------------------------------------------------------------------------------- /tests/syntax_errors/test_missing.si: -------------------------------------------------------------------------------- 1 | algorithm error1(input uint1 bl 2 | { 3 | 4 | } 5 | -------------------------------------------------------------------------------- /tests/syntax_errors/test_unwanted.si: -------------------------------------------------------------------------------- 1 | algorithm 1error1(input uint1 b) 2 | { 3 | 4 | } 5 | -------------------------------------------------------------------------------- /tests/tbl1.si: -------------------------------------------------------------------------------- 1 | algorithm main(output int8 leds) 2 | { 3 | int8 tbl[4] = {21,42,84,168}; 4 | int2 i = 0; 5 | int8 myled = 0; 6 | 7 | leds := myled; 8 | 9 | loop: 10 | i = i + 1; 11 | myled = tbl[i&3]; 12 | goto loop; 13 | 14 | } 15 | -------------------------------------------------------------------------------- /tests/tbl4.si: -------------------------------------------------------------------------------- 1 | algorithm main(output int8 leds) 2 | { 3 | uint8 tbl[4] = {8h21,8h42,8ha4,8hef}; 4 | 5 | __display("%x",tbl[2][4,4]); 6 | } 7 | -------------------------------------------------------------------------------- /tests/tbl5.si: -------------------------------------------------------------------------------- 1 | algorithm main(output int8 leds) 2 | { 3 | uint8 tbl[4] = {8h21,8h42,0,8hef}; 4 | ++: 5 | tbl[2] = 8ha4; 6 | ++: 7 | __display("%x",tbl[3][4,4]); 8 | } 9 | -------------------------------------------------------------------------------- /tests/test_bram/Makefile: -------------------------------------------------------------------------------- 1 | 2 | .DEFAULT: bram.si 3 | ifdef tool 4 | silice-make.py -s bram.si -b $@ -p basic -o BUILD_$(subst :,_,$@) -t $(tool) 5 | else 6 | silice-make.py -s bram.si -b $@ -p basic -o BUILD_$(subst :,_,$@) 7 | endif 8 | 9 | clean: 10 | rm -rf BUILD_* 11 | -------------------------------------------------------------------------------- /tests/test_bram/repro.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | yosys -l yosys.log -p 'synth_ecp5 -abc9 -json build.json' repro.v 4 | -------------------------------------------------------------------------------- /tests/uninit1.si: -------------------------------------------------------------------------------- 1 | algorithm main(output uint8 leds) 2 | { 3 | bram uint8 bramfoo[64] = uninitialized; 4 | uint8 tblfoo[64] = uninitialized; 5 | 6 | uint8 a = uninitialized; 7 | uint8 b = 0; 8 | 9 | __display("%d %d",a,b); 10 | } 11 | -------------------------------------------------------------------------------- /tests/uninit2.si: -------------------------------------------------------------------------------- 1 | algorithm main(output uint8 leds) 2 | { 3 | bram uint8 bramfoo[64] = uninitialized; 4 | uint8 tblfoo[64] = uninitialized; 5 | 6 | uint8 a = uninitialized; 7 | uint8 b = 0; 8 | 9 | __display("%d %d",a,b); 10 | } 11 | -------------------------------------------------------------------------------- /tests/unit2.si: -------------------------------------------------------------------------------- 1 | // units can have a single always block 2 | unit main(output uint8 leds) 3 | { 4 | uint24 count = 0; 5 | 6 | always { 7 | if (count == 132) { __finish(); } 8 | count = count + 1; 9 | __display("count = %d",count); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /tests/unit5.si: -------------------------------------------------------------------------------- 1 | // units always_before/algorithm/always_after are optional 2 | unit main(output uint8 leds) 3 | { 4 | uint24 count = 100; 5 | 6 | algorithm { 7 | while (1) { 8 | if (count == 132) { __finish(); } 9 | leds = count[0,8]; 10 | count = count + 1; 11 | __display("count = %d, leds = %b",count, leds); 12 | } 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /tests/unit6.si: -------------------------------------------------------------------------------- 1 | // units always_before/algorithm/always_after are optional 2 | unit main(output uint8 leds) 3 | { 4 | uint24 count = 100; 5 | 6 | always_before { 7 | if (count == 132) { __finish(); } 8 | __display("count = %d",count); 9 | count = count + 1; 10 | } 11 | 12 | always_after { 13 | leds = count[0,8]; 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /tests/varinit2.si: -------------------------------------------------------------------------------- 1 | algorithm main(output uint8 led) 2 | { 3 | uint8 v1 = 1; 4 | 5 | { 6 | uint8 v6 = 6; 7 | v6 = 3; 8 | 9 | { 10 | uint3 v7 = 12; 11 | v6 = 8; 12 | v7 = v6 + 1; 13 | } 14 | // v7 = 1; 15 | } 16 | 17 | // v6 = 5; 18 | } 19 | -------------------------------------------------------------------------------- /tests/varinit3.si: -------------------------------------------------------------------------------- 1 | circuitry test(input a,output b) 2 | { 3 | uint8 v = 13; 4 | b = a + v; 5 | } 6 | 7 | algorithm main(output uint8 led) 8 | { 9 | uint8 a = 1; 10 | (led) = test(a); 11 | } -------------------------------------------------------------------------------- /tests/vga_quad/wall.tga: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/tests/vga_quad/wall.tga -------------------------------------------------------------------------------- /tests/while_cycle_after_2.si: -------------------------------------------------------------------------------- 1 | algorithm main(output uint8 leds) 2 | { 3 | uint1 C = 0; 4 | 5 | __display("before"); 6 | while (C) { 7 | __display("in loop"); 8 | } 9 | __display("after"); 10 | 11 | } -------------------------------------------------------------------------------- /tests/while_cycle_after_3.si: -------------------------------------------------------------------------------- 1 | algorithm main(output uint8 leds) 2 | { 3 | uint1 C = 0; 4 | 5 | __display("before"); 6 | while (C) { __display("waiting"); } 7 | __display("thing done after"); 8 | 9 | ++: 10 | __display("a later state"); 11 | 12 | 13 | } -------------------------------------------------------------------------------- /tests/while_cycle_after_4.si: -------------------------------------------------------------------------------- 1 | algorithm main(output uint8 leds) 2 | { 3 | uint1 C = 0; 4 | 5 | __display("before"); 6 | while (1) { 7 | if (C) { 8 | __display("in loop"); 9 | } else { 10 | __display("after"); 11 | break; 12 | } 13 | } 14 | 15 | } -------------------------------------------------------------------------------- /tests/widthof1.si: -------------------------------------------------------------------------------- 1 | algorithm main(output uint8 leds) 2 | { 3 | sameas(leds) a(0); 4 | 5 | leds = a + widthof(leds); 6 | } 7 | -------------------------------------------------------------------------------- /tests/wire1.si: -------------------------------------------------------------------------------- 1 | algorithm main() { 2 | uint8 a = 1; 3 | uint8 b = 2; 4 | uint9 a_plus_b ::= a + b; 5 | 6 | a = 15; 7 | b = 3; 8 | 9 | __display("%d", a_plus_b); 10 | } -------------------------------------------------------------------------------- /tests/wire2.si: -------------------------------------------------------------------------------- 1 | algorithm main() { 2 | uint8 a = 1; 3 | uint8 b = 2; 4 | uint8 c = 3; 5 | uint8 d = 4; 6 | 7 | uint8 z := a + d; 8 | uint8 w := a; 9 | uint9 a_plus_b := w + b; 10 | 11 | a = 3; 12 | b = 5; 13 | d = 1; 14 | ++: 15 | c = a_plus_b; 16 | 17 | } 18 | -------------------------------------------------------------------------------- /tools/sublimeText/Silice-icarus.sublime-build: -------------------------------------------------------------------------------- 1 | { 2 | "cmd": ["make", "icarus"], 3 | } -------------------------------------------------------------------------------- /tools/sublimeText/Silice-verilator.sublime-build: -------------------------------------------------------------------------------- 1 | { 2 | "cmd": ["make", "verilator"], 3 | } 4 | -------------------------------------------------------------------------------- /tools/vscode/extensions/silice/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sylefeb/Silice/2d3ce939443e42b383ba1cd0392bec61e2381c99/tools/vscode/extensions/silice/icon.png --------------------------------------------------------------------------------