Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
a4519e7a0This file is pinned to the selected release. Download the original to open it in your design tool.
-- Generated by Hastlayer (hastlayer.com) at <date and time removed for approval testing> for the following hardware entry points:
-- * System.Void Hast.Samples.FSharpSampleAssembly.FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(Hast.Transformer.SimpleMemory.SimpleMemory)
-- VHDL libraries necessary for the generated code to work. These libraries are included here instead of being managed separately in the Hardware Framework so they can be more easily updated.
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
package TypeConversion is
function SmartResize(input: unsigned; size: natural) return unsigned;
function SmartResize(input: signed; size: natural) return signed;
function ToUnsignedAndExpand(input: signed; size: natural) return unsigned;
end TypeConversion;
package body TypeConversion is
-- The .NET behavior is different than that of resize() ("To create a larger vector, the new [leftmost] bit
-- positions are filled with the sign bit(ARG'LEFT). When truncating, the sign bit is retained along with the
-- rightmost part.") when casting to a smaller type: "If the source type is larger than the destination type,
-- then the source value is truncated by discarding its "extra" most significant bits. The result is then
-- treated as a value of the destination type." Thus we need to simply truncate when casting down. See:
-- https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/conversions
function SmartResize(input: unsigned; size: natural) return unsigned is
begin
if (size < input'LENGTH) then
return input(size - 1 downto 0);
else
-- Resize() is supposed to work with little endian numbers: "When truncating, the sign bit is retained
-- along with the rightmost part." for signed numbers and "When truncating, the leftmost bits are
-- dropped." for unsigned ones. See: http://www.csee.umbc.edu/portal/help/VHDL/numeric_std.vhdl
return resize(input, size);
end if;
end SmartResize;
function SmartResize(input: signed; size: natural) return signed is
begin
if (size < input'LENGTH) then
return input(size - 1 downto 0);
else
return resize(input, size);
end if;
end SmartResize;
function ToUnsignedAndExpand(input: signed; size: natural) return unsigned is
variable result: unsigned(size - 1 downto 0);
begin
if (input >= 0) then
return resize(unsigned(input), size);
else
result := (others => '1');
result(input'LENGTH - 1 downto 0) := unsigned(input);
return result;
end if;
end ToUnsignedAndExpand;
end TypeConversion;
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
package SimpleMemory is
-- Data conversion functions:
function ConvertUInt32ToStdLogicVector(input: unsigned(31 downto 0)) return std_logic_vector;
function ConvertStdLogicVectorToUInt32(input : std_logic_vector) return unsigned;
function ConvertBooleanToStdLogicVector(input: boolean) return std_logic_vector;
function ConvertStdLogicVectorToBoolean(input : std_logic_vector) return boolean;
function ConvertInt32ToStdLogicVector(input: signed(31 downto 0)) return std_logic_vector;
function ConvertStdLogicVectorToInt32(input : std_logic_vector) return signed;
end SimpleMemory;
package body SimpleMemory is
function ConvertUInt32ToStdLogicVector(input: unsigned(31 downto 0)) return std_logic_vector is
begin
return std_logic_vector(input);
end ConvertUInt32ToStdLogicVector;
function ConvertStdLogicVectorToUInt32(input : std_logic_vector) return unsigned is
begin
return unsigned(input);
end ConvertStdLogicVectorToUInt32;
function ConvertBooleanToStdLogicVector(input: boolean) return std_logic_vector is
begin
case input is
when true => return X"FFFFFFFF";
when false => return X"00000000";
when others => return X"00000000";
end case;
end ConvertBooleanToStdLogicVector;
function ConvertStdLogicVectorToBoolean(input : std_logic_vector) return boolean is
begin
-- In .NET a false is all zeros while a true is at least one 1 bit (or more), so using the same logic here.
return not(input = X"00000000");
end ConvertStdLogicVectorToBoolean;
function ConvertInt32ToStdLogicVector(input: signed(31 downto 0)) return std_logic_vector is
begin
return std_logic_vector(input);
end ConvertInt32ToStdLogicVector;
function ConvertStdLogicVectorToInt32(input : std_logic_vector) return signed is
begin
return signed(input);
end ConvertStdLogicVectorToInt32;
end SimpleMemory;
-- Hast_IP, logic generated from the input .NET assemblies starts here.
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
library work;
use work.TypeConversion.all;
library work;
use work.SimpleMemory.all;
entity Hast_IP is
port(
\DataIn\: In std_logic_vector(31 downto 0);
\DataOut\: Out std_logic_vector(31 downto 0);
\CellIndex\: Out integer;
\ReadEnable\: Out boolean;
\WriteEnable\: Out boolean;
\ReadsDone\: In boolean;
\WritesDone\: In boolean;
\MemberId\: In integer;
\Reset\: In std_logic;
\Started\: In boolean;
\Finished\: Out boolean;
\Clock\: In std_logic
);
-- (Hast_IP ID removed for approval testing.)
-- (Date and time removed for approval testing.)
-- Generated by Hastlayer - hastlayer.com
-- Hast_IP's simple interface makes it suitable to plug it into any hardware implementation. The meaning and usage of the
-- ports are as below:
-- * MemberId: Each transformed .NET hardware entry point member (i.e. methods that are configured to be available to be
-- called from the host PC) has a unique zero-based numeric ID. When selecting which one to execute this ID
-- should be used.
-- * Started: Indicates whether the execution of a given hardware entry point member is started. Used in the following way:
-- 1. Started is set to TRUE by the consuming framework, after which the execution of the given member starts
-- internally. The Finished port will be initially set to FALSE.
-- 2. Once the execution is finished, the Finished port will be set to TRUE.
-- 3. The consuming framework sets Started to FALSE, after which Finished will also be set to FALSE.
-- * Finished: Indicates whether the execution of a given hardware entry point member is complete. See the documentation of
-- the Started port above on how it is used.
-- * Reset: Synchronous reset.
-- * Clock: The main clock.
-- * DataIn: Data read out from the memory (usually on-board DDR RAM, but depends on the framework) should be assigned to
-- this port by the framework. The width of this port is always 32b, independent of the hardware platform (if the
-- bus to the memory is wider then caching needs to be implemented in the framework to make use of it). Inputs of
-- the algorithm implemented in Hast_IP all come through this port.
-- * DataOut: Data to be written to the memory is assigned to this port. The width of this port is always 32b, independent
-- of the hardware platform (if the bus to the memory is wider then caching needs to be implemented in the
-- framework to make use of it). Outputs of the algorithm implemented in Hast_IP all go through this port.
-- * CellIndex: Zero-based index of the SimpleMemory memory cell currently being read or written. Transformed code in
-- Hastlayer can access memory in a simplified fashion by addressing 32b "cells", the accessible physical
-- memory space being divided up in such individually addressable cells.
-- * ReadEnable: Indicates whether a memory read operation is initiated. The process of a memory read is as following:
-- 1. ReadEnable is FALSE by default. It's set to TRUE when a memory read is started. CellIndex is set to the index of
-- the memory cell to be read out.
-- 2. Waiting for ReadsDone to be TRUE.
-- 3. Once ReadsDone is TRUE, data from DataIn will be read out and ReadEnable set to FALSE.
-- * WriteEnable: Indicates whether a memory write operation is initiated. The process of a memory write is as following:
-- 1. WriteEnable is FALSE by default. It's set to TRUE when a memory write is started. CellIndex is set to the index
-- of the memory cell to be written and the output data is assigned to DataOut.
-- 2. Waiting for WritesDone to be TRUE.
-- 3. Once WritesDone is TRUE, WriteEnable is set to FALSE.
-- * ReadsDone: Indicates whether a memory read operation is completed.
-- * WritesDone: Indicates whether a memory write operation is completed.
end Hast_IP;
architecture Imp of Hast_IP is
-- This IP was generated by Hastlayer from .NET code to mimic the original logic. Note the following:
-- * For each member (methods, functions, properties) in .NET a state machine was generated. Each state machine's name
-- corresponds to the original member's name.
-- * Inputs and outputs are passed between state machines as shared objects.
-- * There are operations that take multiple clock cycles like interacting with the memory and long-running arithmetic
-- operations (modulo, division, multiplication). These are awaited in subsequent states but be aware that some states
-- can take more than one clock cycle to produce their output.
-- * The ExternalInvocationProxy process dispatches invocations that were started from the outside to the state machines.
-- * The InternalInvocationProxy processes dispatch invocations between state machines.
-- Custom inter-dependent type declarations start
type \signed32_Array\ is array (integer range <>) of signed(31 downto 0);
-- Custom inter-dependent type declarations end
-- System.Void Hast.Samples.FSharpSampleAssembly.FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(Hast.Transformer.SimpleMemory.SimpleMemory).0 declarations start
-- State machine states:
type \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._States\ is (
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State_0\,
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State_1\,
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State_2\,
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State_3\,
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State_4\,
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State_5\,
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State_6\,
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State_7\,
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State_8\,
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State_9\,
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State_10\);
-- Signals:
Signal \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._Finished\: boolean := false;
Signal \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.SimpleMemory.CellIndex\: signed(31 downto 0) := to_signed(0, 32);
Signal \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.SimpleMemory.DataOut\: std_logic_vector(31 downto 0) := (others => '0');
Signal \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.SimpleMemory.ReadEnable\: boolean := false;
Signal \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.SimpleMemory.WriteEnable\: boolean := false;
Signal \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).indexObject.parameter.Out.0\: signed(31 downto 0) := to_signed(0, 32);
Signal \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).input.parameter.Out.0\: signed(31 downto 0) := to_signed(0, 32);
Signal \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object)._Started.0\: boolean := false;
Signal \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).indexObject.parameter.Out.1\: signed(31 downto 0) := to_signed(0, 32);
Signal \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).input.parameter.Out.1\: signed(31 downto 0) := to_signed(0, 32);
Signal \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object)._Started.1\: boolean := false;
Signal \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).indexObject.parameter.Out.2\: signed(31 downto 0) := to_signed(0, 32);
Signal \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).input.parameter.Out.2\: signed(31 downto 0) := to_signed(0, 32);
Signal \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object)._Started.2\: boolean := false;
Signal \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._Started\: boolean := false;
Signal \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object)._Finished.0\: boolean := false;
Signal \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object)._Finished.1\: boolean := false;
Signal \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object)._Finished.2\: boolean := false;
Signal \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).return.0\: signed(31 downto 0) := to_signed(0, 32);
Signal \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).return.1\: signed(31 downto 0) := to_signed(0, 32);
Signal \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).return.2\: signed(31 downto 0) := to_signed(0, 32);
-- System.Void Hast.Samples.FSharpSampleAssembly.FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(Hast.Transformer.SimpleMemory.SimpleMemory).0 declarations end
-- System.Int32 Hast.Samples.FSharpSampleAssembly.FSharpParallelAlgorithmContainer+Run@36::Invoke(System.Object).0 declarations start
-- State machine states:
type \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._States\ is (
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State_0\,
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State_1\,
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State_2\,
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State_3\,
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State_4\,
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State_5\,
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State_6\,
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State_7\);
-- Signals:
Signal \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._Finished\: boolean := false;
Signal \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.return\: signed(31 downto 0) := to_signed(0, 32);
Signal \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._Started\: boolean := false;
Signal \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.indexObject.parameter.In\: signed(31 downto 0) := to_signed(0, 32);
Signal \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.input.parameter.In\: signed(31 downto 0) := to_signed(0, 32);
-- System.Int32 Hast.Samples.FSharpSampleAssembly.FSharpParallelAlgorithmContainer+Run@36::Invoke(System.Object).0 declarations end
-- System.Int32 Hast.Samples.FSharpSampleAssembly.FSharpParallelAlgorithmContainer+Run@36::Invoke(System.Object).1 declarations start
-- State machine states:
type \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._States\ is (
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State_0\,
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State_1\,
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State_2\,
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State_3\,
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State_4\,
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State_5\,
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State_6\,
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State_7\);
-- Signals:
Signal \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._Finished\: boolean := false;
Signal \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.return\: signed(31 downto 0) := to_signed(0, 32);
Signal \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._Started\: boolean := false;
Signal \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.indexObject.parameter.In\: signed(31 downto 0) := to_signed(0, 32);
Signal \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.input.parameter.In\: signed(31 downto 0) := to_signed(0, 32);
-- System.Int32 Hast.Samples.FSharpSampleAssembly.FSharpParallelAlgorithmContainer+Run@36::Invoke(System.Object).1 declarations end
-- System.Int32 Hast.Samples.FSharpSampleAssembly.FSharpParallelAlgorithmContainer+Run@36::Invoke(System.Object).2 declarations start
-- State machine states:
type \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._States\ is (
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State_0\,
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State_1\,
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State_2\,
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State_3\,
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State_4\,
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State_5\,
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State_6\,
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State_7\);
-- Signals:
Signal \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._Finished\: boolean := false;
Signal \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.return\: signed(31 downto 0) := to_signed(0, 32);
Signal \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._Started\: boolean := false;
Signal \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.indexObject.parameter.In\: signed(31 downto 0) := to_signed(0, 32);
Signal \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.input.parameter.In\: signed(31 downto 0) := to_signed(0, 32);
-- System.Int32 Hast.Samples.FSharpSampleAssembly.FSharpParallelAlgorithmContainer+Run@36::Invoke(System.Object).2 declarations end
-- System.Void Hast::ExternalInvocationProxy() declarations start
-- Signals:
Signal \FinishedInternal\: boolean := false;
Signal \Hast::ExternalInvocationProxy().FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory)._Started.0\: boolean := false;
Signal \Hast::ExternalInvocationProxy().FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory)._Finished.0\: boolean := false;
-- System.Void Hast::ExternalInvocationProxy() declarations end
-- \System.Void Hast::InternalInvocationProxy()._CommonDeclarations\ declarations start
type \InternalInvocationProxy_boolean_Array\ is array (integer range <>) of boolean;
type \Hast::InternalInvocationProxy()._RunningStates\ is (
WaitingForStarted,
WaitingForFinished,
AfterFinished);
-- \System.Void Hast::InternalInvocationProxy()._CommonDeclarations\ declarations end
begin
-- System.Void Hast.Samples.FSharpSampleAssembly.FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(Hast.Transformer.SimpleMemory.SimpleMemory).0 state machine start
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._StateMachine\: process (\Clock\)
Variable \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State\: \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._States\ := \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State_0\;
Variable \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.input\: signed(31 downto 0) := to_signed(0, 32);
Variable \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.dataIn.0\: std_logic_vector(31 downto 0) := (others => '0');
Variable \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.array\: \signed32_Array\(0 to 279) := (others => to_signed(0, 32));
Variable \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.num\: signed(31 downto 0) := to_signed(0, 32);
Variable \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.binaryOperationResult.0\: boolean := false;
Variable \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).invocationIndex\: integer range 0 to 2 := 0;
Variable \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.binaryOperationResult.1\: signed(31 downto 0) := to_signed(0, 32);
Variable \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.return.0\: signed(31 downto 0) := to_signed(0, 32);
Variable \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.return.1\: signed(31 downto 0) := to_signed(0, 32);
Variable \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.return.2\: signed(31 downto 0) := to_signed(0, 32);
Variable \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.num2\: signed(31 downto 0) := to_signed(0, 32);
Variable \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.binaryOperationResult.2\: boolean := false;
Variable \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.binaryOperationResult.3\: signed(31 downto 0) := to_signed(0, 32);
Variable \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.binaryOperationResult.4\: signed(31 downto 0) := to_signed(0, 32);
begin
if (rising_edge(\Clock\)) then
if (\Reset\ = '1') then
-- Synchronous reset
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._Finished\ <= false;
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.SimpleMemory.CellIndex\ <= to_signed(0, 32);
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.SimpleMemory.DataOut\ <= (others => '0');
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.SimpleMemory.ReadEnable\ <= false;
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.SimpleMemory.WriteEnable\ <= false;
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).indexObject.parameter.Out.0\ <= to_signed(0, 32);
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).input.parameter.Out.0\ <= to_signed(0, 32);
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object)._Started.0\ <= false;
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).indexObject.parameter.Out.1\ <= to_signed(0, 32);
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).input.parameter.Out.1\ <= to_signed(0, 32);
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object)._Started.1\ <= false;
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).indexObject.parameter.Out.2\ <= to_signed(0, 32);
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).input.parameter.Out.2\ <= to_signed(0, 32);
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object)._Started.2\ <= false;
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State\ := \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State_0\;
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.input\ := to_signed(0, 32);
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.dataIn.0\ := (others => '0');
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.array\ := (others => to_signed(0, 32));
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.num\ := to_signed(0, 32);
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.binaryOperationResult.0\ := false;
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).invocationIndex\ := 0;
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.binaryOperationResult.1\ := to_signed(0, 32);
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.return.0\ := to_signed(0, 32);
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.return.1\ := to_signed(0, 32);
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.return.2\ := to_signed(0, 32);
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.num2\ := to_signed(0, 32);
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.binaryOperationResult.2\ := false;
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.binaryOperationResult.3\ := to_signed(0, 32);
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.binaryOperationResult.4\ := to_signed(0, 32);
else
case \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State\ is
when \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State_0\ =>
-- Start state
-- Waiting for the start signal.
if (\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._Started\ = true) then
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State\ := \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State_2\;
end if;
-- Clock cycles needed to complete this state (approximation): 0
when \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State_1\ =>
-- Final state
-- Signaling finished until Started is pulled back to false, then returning to the start state.
if (\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._Started\ = true) then
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._Finished\ <= true;
else
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._Finished\ <= false;
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State\ := \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State_0\;
end if;
-- Clock cycles needed to complete this state (approximation): 0
when \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State_2\ =>
-- The following section was transformed from the .NET statement below:
-- int input;
--
-- The following section was transformed from the .NET statement below:
-- input = memory.ReadInt32 (0);
--
-- Begin SimpleMemory read.
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.SimpleMemory.CellIndex\ <= to_signed(0, 32);
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.SimpleMemory.ReadEnable\ <= true;
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State\ := \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State_3\;
-- Clock cycles needed to complete this state (approximation): 0
when \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State_3\ =>
-- Waiting for the SimpleMemory operation to finish.
if (\ReadsDone\ = true) then
-- SimpleMemory read finished.
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.SimpleMemory.ReadEnable\ <= false;
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.dataIn.0\ := \DataIn\;
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.input\ := ConvertStdLogicVectorToInt32(\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.dataIn.0\);
-- The following section was transformed from the .NET statement below:
-- Task<int>[] array;
--
-- The following section was transformed from the .NET statement below:
-- array = new Task<int>[280];
--
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.array\ := (others => to_signed(0, 32));
-- The following section was transformed from the .NET statement below:
-- int num;
--
-- The following section was transformed from the .NET statement below:
-- num = 0;
--
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.num\ := to_signed(0, 32);
-- The following section was transformed from the .NET statement below:
-- while (num < 280) {
-- array [num] = Task.Factory.StartNew ((Func<object, int>)new Run@36 ().Invoke, num, input);
-- num = num + 1;
-- }
--
-- Starting a while loop.
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State\ := \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State_4\;
end if;
-- Clock cycles needed to complete this state (approximation): 0
when \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State_4\ =>
-- Repeated state of the while loop which was started in state \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State_3\.
-- The while loop's condition:
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.binaryOperationResult.0\ := \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.num\ < to_signed(280, 32);
if (\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.binaryOperationResult.0\) then
-- The following section was transformed from the .NET statement below:
-- {
-- array [num] = Task.Factory.StartNew ((Func<object, int>)new Run@36 ().Invoke, num, input);
-- num = num + 1;
-- }
--
-- The following section was transformed from the .NET statement below:
-- array [num] = Task.Factory.StartNew ((Func<object, int>)new Run@36 ().Invoke, num, input);
--
-- Starting state machine invocation for the following method: System.Int32 Hast.Samples.FSharpSampleAssembly.FSharpParallelAlgorithmContainer+Run@36::Invoke(System.Object)
case \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).invocationIndex\ is
when 0 =>
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).indexObject.parameter.Out.0\ <= \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.num\;
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).input.parameter.Out.0\ <= \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.input\;
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object)._Started.0\ <= true;
when 1 =>
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).indexObject.parameter.Out.1\ <= \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.num\;
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).input.parameter.Out.1\ <= \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.input\;
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object)._Started.1\ <= true;
when 2 =>
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).indexObject.parameter.Out.2\ <= \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.num\;
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).input.parameter.Out.2\ <= \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.input\;
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object)._Started.2\ <= true;
end case;
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).invocationIndex\ := \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).invocationIndex\ + 1;
-- The following section was transformed from the .NET statement below:
-- num = num + 1;
--
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.binaryOperationResult.1\ := \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.num\ + to_signed(1, 32);
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.num\ := \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.binaryOperationResult.1\;
else
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State\ := \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State_5\;
end if;
-- Clock cycles needed to complete this state (approximation): 0.86325
when \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State_5\ =>
-- State after the while loop which was started in state \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State_3\.
-- The following section was transformed from the .NET statement below:
-- Task.WhenAll (array).Wait ();
--
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State\ := \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State_6\;
-- Clock cycles needed to complete this state (approximation): 0
when \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State_6\ =>
-- Waiting for the state machine invocation of the following method to finish: System.Int32 Hast.Samples.FSharpSampleAssembly.FSharpParallelAlgorithmContainer+Run@36::Invoke(System.Object)
if (\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object)._Started.1\ = \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object)._Finished.1\ and \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object)._Started.2\ = \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object)._Finished.2\ and \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object)._Started.0\ = \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object)._Finished.0\) then
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object)._Started.0\ <= false;
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object)._Started.1\ <= false;
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object)._Started.2\ <= false;
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).invocationIndex\ := 0;
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.return.0\ := \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).return.0\;
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.return.1\ := \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).return.1\;
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.return.2\ := \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).return.2\;
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.array\(0) := \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.return.0\;
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.array\(1) := \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.return.1\;
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.array\(2) := \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.return.2\;
-- The following section was transformed from the .NET statement below:
-- int num2;
--
-- The following section was transformed from the .NET statement below:
-- num2 = 0;
--
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.num2\ := to_signed(0, 32);
-- The following section was transformed from the .NET statement below:
-- num = 0;
--
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.num\ := to_signed(0, 32);
-- The following section was transformed from the .NET statement below:
-- while (num < 280) {
-- num2 = num2 + array [num].Result;
-- num = num + 1;
-- }
--
-- Starting a while loop.
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State\ := \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State_7\;
end if;
-- Clock cycles needed to complete this state (approximation): 0
when \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State_7\ =>
-- Repeated state of the while loop which was started in state \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State_6\.
-- The while loop's condition:
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.binaryOperationResult.2\ := \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.num\ < to_signed(280, 32);
if (\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.binaryOperationResult.2\) then
-- The following section was transformed from the .NET statement below:
-- {
-- num2 = num2 + array [num].Result;
-- num = num + 1;
-- }
--
-- The following section was transformed from the .NET statement below:
-- num2 = num2 + array [num].Result;
--
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.binaryOperationResult.3\ := \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.num2\ + \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.array\(to_integer(\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.num\));
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.num2\ := \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.binaryOperationResult.3\;
-- The following section was transformed from the .NET statement below:
-- num = num + 1;
--
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State\ := \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State_9\;
else
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State\ := \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State_8\;
end if;
-- Clock cycles needed to complete this state (approximation): 0.86325
when \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State_8\ =>
-- State after the while loop which was started in state \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State_6\.
-- The following section was transformed from the .NET statement below:
-- memory.WriteInt32 (0, num2);
--
-- Begin SimpleMemory write.
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.SimpleMemory.CellIndex\ <= to_signed(0, 32);
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.SimpleMemory.WriteEnable\ <= true;
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.SimpleMemory.DataOut\ <= ConvertInt32ToStdLogicVector(\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.num2\);
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State\ := \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State_10\;
-- Clock cycles needed to complete this state (approximation): 0
when \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State_9\ =>
-- This state was added because the previous state would go over one clock cycle with any more operations.
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.binaryOperationResult.4\ := \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.num\ + to_signed(1, 32);
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.num\ := \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.binaryOperationResult.4\;
-- Returning to the repeated state of the while loop which was started in state \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State_6\ if the loop wasn't exited with a state change.
if (\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State\ = \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State_9\) then
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State\ := \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State_7\;
end if;
-- Clock cycles needed to complete this state (approximation): 0.3981
when \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State_10\ =>
-- Waiting for the SimpleMemory operation to finish.
if (\WritesDone\ = true) then
-- SimpleMemory write finished.
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.SimpleMemory.WriteEnable\ <= false;
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State\ := \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._State_1\;
end if;
-- Clock cycles needed to complete this state (approximation): 0
end case;
end if;
end if;
end process;
-- System.Void Hast.Samples.FSharpSampleAssembly.FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(Hast.Transformer.SimpleMemory.SimpleMemory).0 state machine end
-- System.Int32 Hast.Samples.FSharpSampleAssembly.FSharpParallelAlgorithmContainer+Run@36::Invoke(System.Object).0 state machine start
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._StateMachine\: process (\Clock\)
Variable \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State\: \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._States\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State_0\;
Variable \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.indexObject\: signed(31 downto 0) := to_signed(0, 32);
Variable \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.input\: signed(31 downto 0) := to_signed(0, 32);
Variable \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.num\: signed(31 downto 0) := to_signed(0, 32);
Variable \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.num2\: signed(31 downto 0) := to_signed(0, 32);
Variable \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.binaryOperationResult.0\: signed(31 downto 0) := to_signed(0, 32);
Variable \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.binaryOperationResult.1\: signed(31 downto 0) := to_signed(0, 32);
Variable \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.flag\: boolean := false;
Variable \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.num3\: signed(31 downto 0) := to_signed(0, 32);
Variable \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.binaryOperationResult.2\: boolean := false;
Variable \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.conditional1\: signed(31 downto 0) := to_signed(0, 32);
Variable \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.unaryOperationResult.0\: boolean := false;
Variable \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.binaryOperationResult.3\: signed(31 downto 0) := to_signed(0, 32);
Variable \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.binaryOperationResult.4\: signed(31 downto 0) := to_signed(0, 32);
Variable \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.unaryOperationResult.1\: boolean := false;
Variable \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.binaryOperationResult.5\: signed(31 downto 0) := to_signed(0, 32);
begin
if (rising_edge(\Clock\)) then
if (\Reset\ = '1') then
-- Synchronous reset
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._Finished\ <= false;
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.return\ <= to_signed(0, 32);
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State_0\;
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.indexObject\ := to_signed(0, 32);
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.input\ := to_signed(0, 32);
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.num\ := to_signed(0, 32);
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.num2\ := to_signed(0, 32);
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.binaryOperationResult.0\ := to_signed(0, 32);
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.binaryOperationResult.1\ := to_signed(0, 32);
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.flag\ := false;
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.num3\ := to_signed(0, 32);
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.binaryOperationResult.2\ := false;
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.conditional1\ := to_signed(0, 32);
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.unaryOperationResult.0\ := false;
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.binaryOperationResult.3\ := to_signed(0, 32);
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.binaryOperationResult.4\ := to_signed(0, 32);
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.unaryOperationResult.1\ := false;
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.binaryOperationResult.5\ := to_signed(0, 32);
else
case \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State\ is
when \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State_0\ =>
-- Start state
-- Waiting for the start signal.
if (\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._Started\ = true) then
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State_2\;
end if;
-- Clock cycles needed to complete this state (approximation): 0
when \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State_1\ =>
-- Final state
-- Signaling finished until Started is pulled back to false, then returning to the start state.
if (\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._Started\ = true) then
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._Finished\ <= true;
else
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._Finished\ <= false;
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State_0\;
end if;
-- Clock cycles needed to complete this state (approximation): 0
when \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State_2\ =>
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.indexObject\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.indexObject.parameter.In\;
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.input\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.input.parameter.In\;
-- The following section was transformed from the .NET statement below:
-- int num;
--
-- The following section was transformed from the .NET statement below:
-- num = indexObject;
--
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.num\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.indexObject\;
-- The following section was transformed from the .NET statement below:
-- int num2;
--
-- The following section was transformed from the .NET statement below:
-- num2 = input + num * 2;
--
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.binaryOperationResult.0\ := SmartResize(\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.num\ * to_signed(2, 32), 32);
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.binaryOperationResult.1\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.input\ + \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.binaryOperationResult.0\;
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.num2\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.binaryOperationResult.1\;
-- The following section was transformed from the .NET statement below:
-- bool flag;
--
-- The following section was transformed from the .NET statement below:
-- flag = true;
--
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.flag\ := true;
-- The following section was transformed from the .NET statement below:
-- int num3;
--
-- The following section was transformed from the .NET statement below:
-- num3 = 2;
--
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.num3\ := to_signed(2, 32);
-- The following section was transformed from the .NET statement below:
-- while (num3 < 9999999) {
-- int conditional1;
-- if ((!flag)) {
-- conditional1 = (num2 - num);
-- } else {
-- conditional1 = (num2 + num);
-- }
-- num2 = (conditional1);
-- flag = !flag;
-- num3 = num3 + 1;
-- }
--
-- Starting a while loop.
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State_3\;
-- Clock cycles needed to complete this state (approximation): 0.5502
when \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State_3\ =>
-- Repeated state of the while loop which was started in state \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State_2\.
-- The while loop's condition:
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.binaryOperationResult.2\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.num3\ < to_signed(9999999, 32);
if (\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.binaryOperationResult.2\) then
-- The following section was transformed from the .NET statement below:
-- {
-- int conditional1;
-- if ((!flag)) {
-- conditional1 = (num2 - num);
-- } else {
-- conditional1 = (num2 + num);
-- }
-- num2 = (conditional1);
-- flag = !flag;
-- num3 = num3 + 1;
-- }
--
-- The following section was transformed from the .NET statement below:
-- int conditional1;
--
-- The following section was transformed from the .NET statement below:
-- if ((!flag)) {
-- conditional1 = (num2 - num);
-- } else {
-- conditional1 = (num2 + num);
-- }
--
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.unaryOperationResult.0\ := not(\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.flag\);
-- This if-else was transformed from a .NET if-else. It spans across multiple states:
-- * The true branch starts in state \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State_6\ and ends in state \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State_6\.
-- * The false branch starts in state \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State_7\ and ends in state \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State_7\.
-- * Execution after either branch will continue in the following state: \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State_5\.
if ((\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.unaryOperationResult.0\)) then
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State_6\;
else
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State_7\;
end if;
else
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State_4\;
end if;
-- Clock cycles needed to complete this state (approximation): 0.56355
when \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State_4\ =>
-- State after the while loop which was started in state \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State_2\.
-- The following section was transformed from the .NET statement below:
-- return num2;
--
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.return\ <= \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.num2\;
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State_1\;
-- Clock cycles needed to complete this state (approximation): 0
when \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State_5\ =>
-- State after the if-else which was started in state \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State_3\.
-- The following section was transformed from the .NET statement below:
-- num2 = (conditional1);
--
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.num2\ := (\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.conditional1\);
-- The following section was transformed from the .NET statement below:
-- flag = !flag;
--
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.unaryOperationResult.1\ := not(\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.flag\);
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.flag\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.unaryOperationResult.1\;
-- The following section was transformed from the .NET statement below:
-- num3 = num3 + 1;
--
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.binaryOperationResult.5\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.num3\ + to_signed(1, 32);
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.num3\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.binaryOperationResult.5\;
-- Returning to the repeated state of the while loop which was started in state \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State_2\ if the loop wasn't exited with a state change.
if (\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State\ = \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State_5\) then
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State_3\;
end if;
-- Clock cycles needed to complete this state (approximation): 0.4965
when \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State_6\ =>
-- True branch of the if-else started in state \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State_3\.
-- The following section was transformed from the .NET statement below:
-- {
-- conditional1 = (num2 - num);
-- }
--
-- The following section was transformed from the .NET statement below:
-- conditional1 = (num2 - num);
--
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.binaryOperationResult.3\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.num2\ - \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.num\;
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.conditional1\ := (\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.binaryOperationResult.3\);
-- Going to the state after the if-else which was started in state \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State_3\.
if (\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State\ = \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State_6\) then
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State_5\;
end if;
-- Clock cycles needed to complete this state (approximation): 0.3564
when \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State_7\ =>
-- False branch of the if-else started in state \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State_3\.
-- The following section was transformed from the .NET statement below:
-- {
-- conditional1 = (num2 + num);
-- }
--
-- The following section was transformed from the .NET statement below:
-- conditional1 = (num2 + num);
--
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.binaryOperationResult.4\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.num2\ + \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.num\;
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.conditional1\ := (\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.binaryOperationResult.4\);
-- Going to the state after the if-else which was started in state \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State_3\.
if (\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State\ = \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State_7\) then
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._State_5\;
end if;
-- Clock cycles needed to complete this state (approximation): 0.3981
end case;
end if;
end if;
end process;
-- System.Int32 Hast.Samples.FSharpSampleAssembly.FSharpParallelAlgorithmContainer+Run@36::Invoke(System.Object).0 state machine end
-- System.Int32 Hast.Samples.FSharpSampleAssembly.FSharpParallelAlgorithmContainer+Run@36::Invoke(System.Object).1 state machine start
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._StateMachine\: process (\Clock\)
Variable \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State\: \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._States\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State_0\;
Variable \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.indexObject\: signed(31 downto 0) := to_signed(0, 32);
Variable \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.input\: signed(31 downto 0) := to_signed(0, 32);
Variable \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.num\: signed(31 downto 0) := to_signed(0, 32);
Variable \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.num2\: signed(31 downto 0) := to_signed(0, 32);
Variable \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.binaryOperationResult.0\: signed(31 downto 0) := to_signed(0, 32);
Variable \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.binaryOperationResult.1\: signed(31 downto 0) := to_signed(0, 32);
Variable \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.flag\: boolean := false;
Variable \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.num3\: signed(31 downto 0) := to_signed(0, 32);
Variable \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.binaryOperationResult.2\: boolean := false;
Variable \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.conditional1\: signed(31 downto 0) := to_signed(0, 32);
Variable \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.unaryOperationResult.0\: boolean := false;
Variable \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.binaryOperationResult.3\: signed(31 downto 0) := to_signed(0, 32);
Variable \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.binaryOperationResult.4\: signed(31 downto 0) := to_signed(0, 32);
Variable \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.unaryOperationResult.1\: boolean := false;
Variable \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.binaryOperationResult.5\: signed(31 downto 0) := to_signed(0, 32);
begin
if (rising_edge(\Clock\)) then
if (\Reset\ = '1') then
-- Synchronous reset
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._Finished\ <= false;
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.return\ <= to_signed(0, 32);
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State_0\;
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.indexObject\ := to_signed(0, 32);
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.input\ := to_signed(0, 32);
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.num\ := to_signed(0, 32);
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.num2\ := to_signed(0, 32);
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.binaryOperationResult.0\ := to_signed(0, 32);
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.binaryOperationResult.1\ := to_signed(0, 32);
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.flag\ := false;
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.num3\ := to_signed(0, 32);
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.binaryOperationResult.2\ := false;
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.conditional1\ := to_signed(0, 32);
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.unaryOperationResult.0\ := false;
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.binaryOperationResult.3\ := to_signed(0, 32);
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.binaryOperationResult.4\ := to_signed(0, 32);
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.unaryOperationResult.1\ := false;
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.binaryOperationResult.5\ := to_signed(0, 32);
else
case \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State\ is
when \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State_0\ =>
-- Start state
-- Waiting for the start signal.
if (\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._Started\ = true) then
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State_2\;
end if;
-- Clock cycles needed to complete this state (approximation): 0
when \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State_1\ =>
-- Final state
-- Signaling finished until Started is pulled back to false, then returning to the start state.
if (\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._Started\ = true) then
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._Finished\ <= true;
else
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._Finished\ <= false;
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State_0\;
end if;
-- Clock cycles needed to complete this state (approximation): 0
when \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State_2\ =>
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.indexObject\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.indexObject.parameter.In\;
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.input\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.input.parameter.In\;
-- The following section was transformed from the .NET statement below:
-- int num;
--
-- The following section was transformed from the .NET statement below:
-- num = indexObject;
--
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.num\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.indexObject\;
-- The following section was transformed from the .NET statement below:
-- int num2;
--
-- The following section was transformed from the .NET statement below:
-- num2 = input + num * 2;
--
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.binaryOperationResult.0\ := SmartResize(\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.num\ * to_signed(2, 32), 32);
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.binaryOperationResult.1\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.input\ + \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.binaryOperationResult.0\;
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.num2\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.binaryOperationResult.1\;
-- The following section was transformed from the .NET statement below:
-- bool flag;
--
-- The following section was transformed from the .NET statement below:
-- flag = true;
--
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.flag\ := true;
-- The following section was transformed from the .NET statement below:
-- int num3;
--
-- The following section was transformed from the .NET statement below:
-- num3 = 2;
--
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.num3\ := to_signed(2, 32);
-- The following section was transformed from the .NET statement below:
-- while (num3 < 9999999) {
-- int conditional1;
-- if ((!flag)) {
-- conditional1 = (num2 - num);
-- } else {
-- conditional1 = (num2 + num);
-- }
-- num2 = (conditional1);
-- flag = !flag;
-- num3 = num3 + 1;
-- }
--
-- Starting a while loop.
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State_3\;
-- Clock cycles needed to complete this state (approximation): 0.5502
when \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State_3\ =>
-- Repeated state of the while loop which was started in state \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State_2\.
-- The while loop's condition:
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.binaryOperationResult.2\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.num3\ < to_signed(9999999, 32);
if (\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.binaryOperationResult.2\) then
-- The following section was transformed from the .NET statement below:
-- {
-- int conditional1;
-- if ((!flag)) {
-- conditional1 = (num2 - num);
-- } else {
-- conditional1 = (num2 + num);
-- }
-- num2 = (conditional1);
-- flag = !flag;
-- num3 = num3 + 1;
-- }
--
-- The following section was transformed from the .NET statement below:
-- int conditional1;
--
-- The following section was transformed from the .NET statement below:
-- if ((!flag)) {
-- conditional1 = (num2 - num);
-- } else {
-- conditional1 = (num2 + num);
-- }
--
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.unaryOperationResult.0\ := not(\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.flag\);
-- This if-else was transformed from a .NET if-else. It spans across multiple states:
-- * The true branch starts in state \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State_6\ and ends in state \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State_6\.
-- * The false branch starts in state \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State_7\ and ends in state \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State_7\.
-- * Execution after either branch will continue in the following state: \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State_5\.
if ((\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.unaryOperationResult.0\)) then
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State_6\;
else
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State_7\;
end if;
else
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State_4\;
end if;
-- Clock cycles needed to complete this state (approximation): 0.56355
when \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State_4\ =>
-- State after the while loop which was started in state \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State_2\.
-- The following section was transformed from the .NET statement below:
-- return num2;
--
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.return\ <= \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.num2\;
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State_1\;
-- Clock cycles needed to complete this state (approximation): 0
when \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State_5\ =>
-- State after the if-else which was started in state \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State_3\.
-- The following section was transformed from the .NET statement below:
-- num2 = (conditional1);
--
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.num2\ := (\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.conditional1\);
-- The following section was transformed from the .NET statement below:
-- flag = !flag;
--
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.unaryOperationResult.1\ := not(\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.flag\);
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.flag\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.unaryOperationResult.1\;
-- The following section was transformed from the .NET statement below:
-- num3 = num3 + 1;
--
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.binaryOperationResult.5\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.num3\ + to_signed(1, 32);
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.num3\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.binaryOperationResult.5\;
-- Returning to the repeated state of the while loop which was started in state \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State_2\ if the loop wasn't exited with a state change.
if (\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State\ = \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State_5\) then
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State_3\;
end if;
-- Clock cycles needed to complete this state (approximation): 0.4965
when \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State_6\ =>
-- True branch of the if-else started in state \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State_3\.
-- The following section was transformed from the .NET statement below:
-- {
-- conditional1 = (num2 - num);
-- }
--
-- The following section was transformed from the .NET statement below:
-- conditional1 = (num2 - num);
--
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.binaryOperationResult.3\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.num2\ - \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.num\;
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.conditional1\ := (\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.binaryOperationResult.3\);
-- Going to the state after the if-else which was started in state \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State_3\.
if (\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State\ = \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State_6\) then
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State_5\;
end if;
-- Clock cycles needed to complete this state (approximation): 0.3564
when \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State_7\ =>
-- False branch of the if-else started in state \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State_3\.
-- The following section was transformed from the .NET statement below:
-- {
-- conditional1 = (num2 + num);
-- }
--
-- The following section was transformed from the .NET statement below:
-- conditional1 = (num2 + num);
--
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.binaryOperationResult.4\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.num2\ + \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.num\;
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.conditional1\ := (\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.binaryOperationResult.4\);
-- Going to the state after the if-else which was started in state \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State_3\.
if (\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State\ = \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State_7\) then
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._State_5\;
end if;
-- Clock cycles needed to complete this state (approximation): 0.3981
end case;
end if;
end if;
end process;
-- System.Int32 Hast.Samples.FSharpSampleAssembly.FSharpParallelAlgorithmContainer+Run@36::Invoke(System.Object).1 state machine end
-- System.Int32 Hast.Samples.FSharpSampleAssembly.FSharpParallelAlgorithmContainer+Run@36::Invoke(System.Object).2 state machine start
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._StateMachine\: process (\Clock\)
Variable \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State\: \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._States\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State_0\;
Variable \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.indexObject\: signed(31 downto 0) := to_signed(0, 32);
Variable \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.input\: signed(31 downto 0) := to_signed(0, 32);
Variable \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.num\: signed(31 downto 0) := to_signed(0, 32);
Variable \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.num2\: signed(31 downto 0) := to_signed(0, 32);
Variable \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.binaryOperationResult.0\: signed(31 downto 0) := to_signed(0, 32);
Variable \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.binaryOperationResult.1\: signed(31 downto 0) := to_signed(0, 32);
Variable \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.flag\: boolean := false;
Variable \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.num3\: signed(31 downto 0) := to_signed(0, 32);
Variable \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.binaryOperationResult.2\: boolean := false;
Variable \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.conditional1\: signed(31 downto 0) := to_signed(0, 32);
Variable \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.unaryOperationResult.0\: boolean := false;
Variable \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.binaryOperationResult.3\: signed(31 downto 0) := to_signed(0, 32);
Variable \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.binaryOperationResult.4\: signed(31 downto 0) := to_signed(0, 32);
Variable \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.unaryOperationResult.1\: boolean := false;
Variable \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.binaryOperationResult.5\: signed(31 downto 0) := to_signed(0, 32);
begin
if (rising_edge(\Clock\)) then
if (\Reset\ = '1') then
-- Synchronous reset
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._Finished\ <= false;
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.return\ <= to_signed(0, 32);
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State_0\;
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.indexObject\ := to_signed(0, 32);
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.input\ := to_signed(0, 32);
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.num\ := to_signed(0, 32);
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.num2\ := to_signed(0, 32);
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.binaryOperationResult.0\ := to_signed(0, 32);
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.binaryOperationResult.1\ := to_signed(0, 32);
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.flag\ := false;
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.num3\ := to_signed(0, 32);
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.binaryOperationResult.2\ := false;
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.conditional1\ := to_signed(0, 32);
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.unaryOperationResult.0\ := false;
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.binaryOperationResult.3\ := to_signed(0, 32);
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.binaryOperationResult.4\ := to_signed(0, 32);
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.unaryOperationResult.1\ := false;
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.binaryOperationResult.5\ := to_signed(0, 32);
else
case \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State\ is
when \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State_0\ =>
-- Start state
-- Waiting for the start signal.
if (\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._Started\ = true) then
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State_2\;
end if;
-- Clock cycles needed to complete this state (approximation): 0
when \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State_1\ =>
-- Final state
-- Signaling finished until Started is pulled back to false, then returning to the start state.
if (\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._Started\ = true) then
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._Finished\ <= true;
else
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._Finished\ <= false;
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State_0\;
end if;
-- Clock cycles needed to complete this state (approximation): 0
when \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State_2\ =>
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.indexObject\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.indexObject.parameter.In\;
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.input\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.input.parameter.In\;
-- The following section was transformed from the .NET statement below:
-- int num;
--
-- The following section was transformed from the .NET statement below:
-- num = indexObject;
--
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.num\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.indexObject\;
-- The following section was transformed from the .NET statement below:
-- int num2;
--
-- The following section was transformed from the .NET statement below:
-- num2 = input + num * 2;
--
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.binaryOperationResult.0\ := SmartResize(\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.num\ * to_signed(2, 32), 32);
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.binaryOperationResult.1\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.input\ + \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.binaryOperationResult.0\;
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.num2\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.binaryOperationResult.1\;
-- The following section was transformed from the .NET statement below:
-- bool flag;
--
-- The following section was transformed from the .NET statement below:
-- flag = true;
--
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.flag\ := true;
-- The following section was transformed from the .NET statement below:
-- int num3;
--
-- The following section was transformed from the .NET statement below:
-- num3 = 2;
--
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.num3\ := to_signed(2, 32);
-- The following section was transformed from the .NET statement below:
-- while (num3 < 9999999) {
-- int conditional1;
-- if ((!flag)) {
-- conditional1 = (num2 - num);
-- } else {
-- conditional1 = (num2 + num);
-- }
-- num2 = (conditional1);
-- flag = !flag;
-- num3 = num3 + 1;
-- }
--
-- Starting a while loop.
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State_3\;
-- Clock cycles needed to complete this state (approximation): 0.5502
when \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State_3\ =>
-- Repeated state of the while loop which was started in state \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State_2\.
-- The while loop's condition:
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.binaryOperationResult.2\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.num3\ < to_signed(9999999, 32);
if (\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.binaryOperationResult.2\) then
-- The following section was transformed from the .NET statement below:
-- {
-- int conditional1;
-- if ((!flag)) {
-- conditional1 = (num2 - num);
-- } else {
-- conditional1 = (num2 + num);
-- }
-- num2 = (conditional1);
-- flag = !flag;
-- num3 = num3 + 1;
-- }
--
-- The following section was transformed from the .NET statement below:
-- int conditional1;
--
-- The following section was transformed from the .NET statement below:
-- if ((!flag)) {
-- conditional1 = (num2 - num);
-- } else {
-- conditional1 = (num2 + num);
-- }
--
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.unaryOperationResult.0\ := not(\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.flag\);
-- This if-else was transformed from a .NET if-else. It spans across multiple states:
-- * The true branch starts in state \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State_6\ and ends in state \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State_6\.
-- * The false branch starts in state \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State_7\ and ends in state \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State_7\.
-- * Execution after either branch will continue in the following state: \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State_5\.
if ((\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.unaryOperationResult.0\)) then
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State_6\;
else
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State_7\;
end if;
else
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State_4\;
end if;
-- Clock cycles needed to complete this state (approximation): 0.56355
when \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State_4\ =>
-- State after the while loop which was started in state \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State_2\.
-- The following section was transformed from the .NET statement below:
-- return num2;
--
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.return\ <= \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.num2\;
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State_1\;
-- Clock cycles needed to complete this state (approximation): 0
when \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State_5\ =>
-- State after the if-else which was started in state \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State_3\.
-- The following section was transformed from the .NET statement below:
-- num2 = (conditional1);
--
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.num2\ := (\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.conditional1\);
-- The following section was transformed from the .NET statement below:
-- flag = !flag;
--
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.unaryOperationResult.1\ := not(\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.flag\);
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.flag\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.unaryOperationResult.1\;
-- The following section was transformed from the .NET statement below:
-- num3 = num3 + 1;
--
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.binaryOperationResult.5\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.num3\ + to_signed(1, 32);
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.num3\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.binaryOperationResult.5\;
-- Returning to the repeated state of the while loop which was started in state \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State_2\ if the loop wasn't exited with a state change.
if (\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State\ = \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State_5\) then
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State_3\;
end if;
-- Clock cycles needed to complete this state (approximation): 0.4965
when \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State_6\ =>
-- True branch of the if-else started in state \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State_3\.
-- The following section was transformed from the .NET statement below:
-- {
-- conditional1 = (num2 - num);
-- }
--
-- The following section was transformed from the .NET statement below:
-- conditional1 = (num2 - num);
--
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.binaryOperationResult.3\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.num2\ - \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.num\;
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.conditional1\ := (\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.binaryOperationResult.3\);
-- Going to the state after the if-else which was started in state \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State_3\.
if (\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State\ = \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State_6\) then
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State_5\;
end if;
-- Clock cycles needed to complete this state (approximation): 0.3564
when \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State_7\ =>
-- False branch of the if-else started in state \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State_3\.
-- The following section was transformed from the .NET statement below:
-- {
-- conditional1 = (num2 + num);
-- }
--
-- The following section was transformed from the .NET statement below:
-- conditional1 = (num2 + num);
--
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.binaryOperationResult.4\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.num2\ + \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.num\;
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.conditional1\ := (\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.binaryOperationResult.4\);
-- Going to the state after the if-else which was started in state \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State_3\.
if (\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State\ = \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State_7\) then
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State\ := \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._State_5\;
end if;
-- Clock cycles needed to complete this state (approximation): 0.3981
end case;
end if;
end if;
end process;
-- System.Int32 Hast.Samples.FSharpSampleAssembly.FSharpParallelAlgorithmContainer+Run@36::Invoke(System.Object).2 state machine end
-- System.Void Hast::ExternalInvocationProxy() start
\Finished\ <= \FinishedInternal\;
\Hast::ExternalInvocationProxy()\: process (\Clock\)
begin
if (rising_edge(\Clock\)) then
if (\Reset\ = '1') then
-- Synchronous reset
\FinishedInternal\ <= false;
\Hast::ExternalInvocationProxy().FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory)._Started.0\ <= false;
else
if (\Started\ = true and \FinishedInternal\ = false) then
-- Starting the state machine corresponding to the given member ID.
case \MemberId\ is
when 0 =>
if (\Hast::ExternalInvocationProxy().FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory)._Started.0\ = false) then
\Hast::ExternalInvocationProxy().FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory)._Started.0\ <= true;
elsif (\Hast::ExternalInvocationProxy().FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory)._Started.0\ = \Hast::ExternalInvocationProxy().FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory)._Finished.0\) then
\Hast::ExternalInvocationProxy().FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory)._Started.0\ <= false;
\FinishedInternal\ <= true;
end if;
when others =>
null;
end case;
else
-- Waiting for Started to be pulled back to zero that signals the framework noting the finish.
if (\Started\ = false and \FinishedInternal\ = true) then
\FinishedInternal\ <= false;
end if;
end if;
end if;
end if;
end process;
-- System.Void Hast::ExternalInvocationProxy() end
-- System.Void Hast::InternalInvocationProxy().System.Int32 Hast.Samples.FSharpSampleAssembly.FSharpParallelAlgorithmContainer+Run@36::Invoke(System.Object) start
-- Signal connections for System.Void Hast.Samples.FSharpSampleAssembly.FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(Hast.Transformer.SimpleMemory.SimpleMemory).0 (#0):
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._Started\ <= \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object)._Started.0\;
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.indexObject.parameter.In\ <= \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).indexObject.parameter.Out.0\;
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.input.parameter.In\ <= \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).input.parameter.Out.0\;
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object)._Finished.0\ <= \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0._Finished\;
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).return.0\ <= \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).0.return\;
-- Signal connections for System.Void Hast.Samples.FSharpSampleAssembly.FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(Hast.Transformer.SimpleMemory.SimpleMemory).0 (#1):
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._Started\ <= \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object)._Started.1\;
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.indexObject.parameter.In\ <= \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).indexObject.parameter.Out.1\;
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.input.parameter.In\ <= \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).input.parameter.Out.1\;
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object)._Finished.1\ <= \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1._Finished\;
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).return.1\ <= \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).1.return\;
-- Signal connections for System.Void Hast.Samples.FSharpSampleAssembly.FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(Hast.Transformer.SimpleMemory.SimpleMemory).0 (#2):
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._Started\ <= \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object)._Started.2\;
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.indexObject.parameter.In\ <= \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).indexObject.parameter.Out.2\;
\FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.input.parameter.In\ <= \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).input.parameter.Out.2\;
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object)._Finished.2\ <= \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2._Finished\;
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).return.2\ <= \FSharpParallelAlgorithmContainer+Run@36::Invoke(Object).2.return\;
-- System.Void Hast::InternalInvocationProxy().System.Int32 Hast.Samples.FSharpSampleAssembly.FSharpParallelAlgorithmContainer+Run@36::Invoke(System.Object) end
-- System.Void Hast::InternalInvocationProxy().System.Void Hast.Samples.FSharpSampleAssembly.FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(Hast.Transformer.SimpleMemory.SimpleMemory) start
-- Signal connections for System.Void Hast::ExternalInvocationProxy() (#0):
\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._Started\ <= \Hast::ExternalInvocationProxy().FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory)._Started.0\;
\Hast::ExternalInvocationProxy().FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory)._Finished.0\ <= \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0._Finished\;
-- System.Void Hast::InternalInvocationProxy().System.Void Hast.Samples.FSharpSampleAssembly.FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(Hast.Transformer.SimpleMemory.SimpleMemory) end
-- System.Void Hast::SimpleMemoryOperationProxy() start
\CellIndex\ <= to_integer(\FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.SimpleMemory.CellIndex\) when \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.SimpleMemory.ReadEnable\ or \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.SimpleMemory.WriteEnable\ else 0;
\DataOut\ <= \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.SimpleMemory.DataOut\ when \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.SimpleMemory.WriteEnable\ else (others => '0');
\ReadEnable\ <= \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.SimpleMemory.ReadEnable\;
\WriteEnable\ <= \FSharpParallelAlgorithmContainer+FSharpParallelAlgorithm::Run(SimpleMemory).0.SimpleMemory.WriteEnable\;
-- System.Void Hast::SimpleMemoryOperationProxy() end
end Imp;