public QuSoCModuleSimulator FromApp(string appName)
        {
            var firmwareTools = new FirmwareTools(AppPath(appName));

            Assert.IsTrue(firmwareTools.FirmwareFromAppFolder());

            var instructions = RISCVIntegrationClient
                               .ToInstructions(File.ReadAllBytes(firmwareTools.FirmwareFile))
                               .ToArray();
            var sim = PowerUp(instructions);

            return(sim);
        }
Esempio n. 2
0
        public uint[] Instructions()
        {
            if (!File.Exists(FirmwareFile))
            {
                return(new uint[0]);
            }

            var instructions = RISCVIntegrationClient
                               .ToInstructions(File.ReadAllBytes(FirmwareFile))
                               .ToArray();

            return(instructions);
        }
Esempio n. 3
0
        public uint[] FromAsmSource(string asmSource)
        {
            // making a API call to integration server.
            if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
            {
                // on Windows, integration server is required to run in Docker or WSL.
                // Installation steps are same for WSL and for docker.
                // https://github.com/EvgenyMuryshkin/Quokka.RISCV.Docker

                var instructions = RISCVIntegrationClient.Asm(new RISCVIntegrationEndpoint(), asmSource);
                return(instructions.Result);
            }
            else
            {
                // on Linux, just make local call to RISCV toolchain
                return(RISCVIntegrationClient.ToInstructions(Toolchain.Asm(asmSource)).ToArray());
            }
        }
        uint[] Instructions()
        {
            var instructions = RISCVIntegrationClient.ToInstructions(File.ReadAllBytes(FirmwareFile)).ToArray();

            return(instructions);
        }