OpenCores
URL https://opencores.org/ocsvn/encore/encore/trunk

Subversion Repositories encore

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 5 to Rev 6
    Reverse comparison

Rev 5 → Rev 6

/encore/trunk/fpmult/fpmult.qsf
38,7 → 38,7
 
set_global_assignment -name FAMILY "Cyclone II"
set_global_assignment -name DEVICE EP2C20F484C7
set_global_assignment -name TOP_LEVEL_ENTITY fpmult_top
set_global_assignment -name TOP_LEVEL_ENTITY fpmult
set_global_assignment -name ORIGINAL_QUARTUS_VERSION 10.0
set_global_assignment -name PROJECT_CREATION_TIME_DATE "18:02:41 JANUARY 28, 2011"
set_global_assignment -name LAST_QUARTUS_VERSION 10.1
55,12 → 55,6
set_global_assignment -name RESERVE_ALL_UNUSED_PINS_NO_OUTPUT_GND "AS INPUT TRI-STATED"
set_global_assignment -name VHDL_FILE src/fpmult.vhdl
set_global_assignment -name VHDL_FILE src/fpmult_comp.vhdl
set_global_assignment -name BDF_FILE src/fpmult_top.bdf
set_global_assignment -name PARTITION_NETLIST_TYPE SOURCE -section_id Top
set_global_assignment -name PARTITION_FITTER_PRESERVATION_LEVEL PLACEMENT_AND_ROUTING -section_id Top
set_global_assignment -name PARTITION_COLOR 16764057 -section_id Top
set_global_assignment -name LL_ROOT_REGION ON -section_id "Root Region"
set_global_assignment -name LL_MEMBER_STATE LOCKED -section_id "Root Region"
set_global_assignment -name ENABLE_SIGNALTAP OFF
set_global_assignment -name USE_SIGNALTAP_FILE src/SignalTap.stp
set_location_assignment PIN_A13 -to GPIO_0[0]
342,14 → 336,19
set_location_assignment PIN_W7 -to SRAM_UB_N
set_location_assignment PIN_AA10 -to SRAM_WE_N
set_location_assignment PIN_AB15 -to FL_CE_N
set_global_assignment -name SOURCE_FILE src/sp.spf
set_global_assignment -name QIP_FILE src/sp.qip
set_global_assignment -name STRATIX_DEVICE_IO_STANDARD "3.3-V LVTTL"
set_global_assignment -name MISC_FILE "D:/Work/VHDL/fpmult/fpmult.dpf"
set_global_assignment -name VHDL_FILE src/fpmult_stage23_comp.vhdl
set_global_assignment -name VHDL_FILE src/fpmult_stage23.vhdl
set_global_assignment -name VHDL_FILE src/fpmult_generic.vhdl
set_global_assignment -name VHDL_FILE src/fp_generic.vhdl
set_global_assignment -name VHDL_FILE src/fpmult_stageN.vhdl
set_global_assignment -name VHDL_FILE src/fpmult_stageN_comp.vhdl
set_global_assignment -name EDA_USER_COMPILED_SIMULATION_LIBRARY_DIRECTORY "D:/Work/VHDL/encore/fpmult/sim" -section_id eda_simulation
set_global_assignment -name EDA_SIMULATION_TOOL "ModelSim-Altera (VHDL)"
set_global_assignment -name EDA_OUTPUT_DATA_FORMAT VHDL -section_id eda_simulation
set_global_assignment -name PARTITION_NETLIST_TYPE SOURCE -section_id Top
set_global_assignment -name PARTITION_FITTER_PRESERVATION_LEVEL PLACEMENT_AND_ROUTING -section_id Top
set_global_assignment -name PARTITION_COLOR 16764057 -section_id Top
set_global_assignment -name LL_ROOT_REGION ON -section_id "Root Region"
set_global_assignment -name LL_MEMBER_STATE LOCKED -section_id "Root Region"
set_instance_assignment -name PARTITION_HIERARCHY root_partition -to | -section_id Top
/encore/trunk/fpmult/simulation/modelsim/work/_vmake
0,0 → 1,3
m255
K3
cModel Technology
/encore/trunk/fpmult/simulation/modelsim/work/_info
0,0 → 1,308
m255
K3
13
cModel Technology
Z0 dD:\Work\VHDL\encore\fpmult\simulation\modelsim
Pfp_generic
Z1 DPx4 ieee 11 numeric_std 0 22 =NSdli^?T5OD8;4F<blj<3
Z2 DPx4 ieee 14 std_logic_1164 0 22 GH1=`jDDBJ=`LM;:Ak`kf2
Z3 w1298622665
Z4 dD:\Work\VHDL\encore\fpmult\simulation\modelsim
Z5 8D:/Work/VHDL/encore/fpmult/src/fp_generic.vhdl
Z6 FD:/Work/VHDL/encore/fpmult/src/fp_generic.vhdl
l0
L5
VIZ87?]:eGi;[Of;KI853a1
Z7 OV;C;6.6c;45
32
b1
Z8 Mx2 4 ieee 14 std_logic_1164
Z9 Mx1 4 ieee 11 numeric_std
Z10 o-work work -O0
Z11 tExplicit 1
!s100 6E[>iDgXF0f5^P;EniR?N1
Bbody
DBx4 work 10 fp_generic 0 22 IZ87?]:eGi;[Of;KI853a1
R1
R2
l0
L34
VN2`Ro=8if51_l3iC^e:Xn3
R7
32
R8
R9
R10
R11
nbody
!s100 DT]ngZP]JkUIl6I=JQLe61
Efpmult
Z12 w1298620573
Z13 DPx4 work 19 fpmult_stage23_comp 0 22 l>OeUL5UY5P7oNm;Lak>a0
Z14 DPx4 work 18 fpmult_stagen_comp 0 22 XEeJY3OH<`T5HG0=TD@in1
Z15 DPx4 work 18 fpmult_stage0_comp 0 22 ?R^WWoo?6<Z:1Qn:WB^il2
R1
Z16 DPx4 work 10 fp_generic 0 22 IZ87?]:eGi;[Of;KI853a1
Z17 DPx4 work 11 fpmult_comp 0 22 FZj;T54B?36HIEUM3YbeM1
R2
R4
Z18 8D:/Work/VHDL/encore/fpmult/src/fpmult.vhdl
Z19 FD:/Work/VHDL/encore/fpmult/src/fpmult.vhdl
l0
L8
V9kGPb=cG;QOTLXm9`=HF>0
R7
32
R10
R11
!s100 []?gj@:ze2=MCVb_4Ek=A1
Astructural
R13
R14
R15
R1
R16
R17
R2
DEx4 work 6 fpmult 0 22 9kGPb=cG;QOTLXm9`=HF>0
l25
L16
VHJzeXV=CECP^_oC][E@272
R7
32
Mx7 4 ieee 14 std_logic_1164
Mx6 4 work 11 fpmult_comp
Mx5 4 work 10 fp_generic
Z20 Mx4 4 ieee 11 numeric_std
Mx3 4 work 18 fpmult_stage0_comp
Mx2 4 work 18 fpmult_stagen_comp
Mx1 4 work 19 fpmult_stage23_comp
R10
R11
!s100 4PYzmBe=?N>dzWzalW?EE2
Pfpmult_comp
R1
R16
R2
w1298502618
R4
8D:/Work/VHDL/encore/fpmult/src/fpmult_comp.vhdl
FD:/Work/VHDL/encore/fpmult/src/fpmult_comp.vhdl
l0
L5
VFZj;T54B?36HIEUM3YbeM1
R7
32
Z21 Mx3 4 ieee 14 std_logic_1164
Z22 Mx2 4 work 10 fp_generic
R9
R10
R11
!s100 8^Jf^Q8ob[?`R2T:GheOT2
Efpmult_stage0
Z23 w1298199207
R14
R15
R16
R1
R2
R4
Z24 8D:/Work/VHDL/encore/fpmult/src/fpmult_stage0.vhdl
Z25 FD:/Work/VHDL/encore/fpmult/src/fpmult_stage0.vhdl
l0
L7
VL2dEWf?GHUPVQDR901Fd_1
R7
32
R10
R11
!s100 77bDK@;K8dSjGD5YCmSNT1
Atwoproc
R14
R15
R16
R1
R2
DEx4 work 13 fpmult_stage0 0 22 L2dEWf?GHUPVQDR901Fd_1
l25
L15
VC_E;h>YkM6FMKnA:LT6nf3
R7
32
Z26 Mx5 4 ieee 14 std_logic_1164
R20
Z27 Mx3 4 work 10 fp_generic
Mx2 4 work 18 fpmult_stage0_comp
Z28 Mx1 4 work 18 fpmult_stagen_comp
R10
R11
!s100 KW5[86nlFNQg394Lh2=Y21
Pfpmult_stage0_comp
R14
R16
R1
R2
w1298622844
R4
8D:/Work/VHDL/encore/fpmult/src/fpmult_stage0_comp.vhdl
FD:/Work/VHDL/encore/fpmult/src/fpmult_stage0_comp.vhdl
l0
L7
V?R^WWoo?6<Z:1Qn:WB^il2
R7
32
Z29 Mx4 4 ieee 14 std_logic_1164
Z30 Mx3 4 ieee 11 numeric_std
R22
R28
R10
R11
!s100 ]Jhe1]kYb68zRohSLL[SX2
Efpmult_stage23
Z31 w1298114894
R14
R13
R16
R1
R2
R4
Z32 8D:/Work/VHDL/encore/fpmult/src/fpmult_stage23.vhdl
Z33 FD:/Work/VHDL/encore/fpmult/src/fpmult_stage23.vhdl
l0
L7
V31UgWknMFU?z9^k0X7Vfz0
R7
32
R10
R11
!s100 ;4ae:GNQf2^<M[0koFgzd2
Atwoproc
R14
R13
R16
R1
R2
DEx4 work 14 fpmult_stage23 0 22 31UgWknMFU?z9^k0X7Vfz0
l22
L15
VF:e19Y6WO`o6<TUC3QRSh3
R7
32
R26
R20
R27
Mx2 4 work 19 fpmult_stage23_comp
R28
R10
R11
!s100 RIDXClPf=Q<=5YLKoLG<h2
Pfpmult_stage23_comp
R14
R16
R1
R2
w1298622862
R4
8D:/Work/VHDL/encore/fpmult/src/fpmult_stage23_comp.vhdl
FD:/Work/VHDL/encore/fpmult/src/fpmult_stage23_comp.vhdl
l0
L7
Vl>OeUL5UY5P7oNm;Lak>a0
R7
32
R29
R30
R22
R28
R10
R11
!s100 85_ZfHLd;b4QSZeob;kmm0
Efpmult_stagen
Z34 w1298116579
R14
R16
R1
R2
R4
Z35 8D:/Work/VHDL/encore/fpmult/src/fpmult_stageN.vhdl
Z36 FD:/Work/VHDL/encore/fpmult/src/fpmult_stageN.vhdl
l0
L7
V0>mbz2jf_`ZdK_?nJb7dz2
R7
32
R10
R11
!s100 g7;zFEZEAMHIMN9V6eC[]2
Atwoproc
R14
R16
R1
R2
DEx4 work 13 fpmult_stagen 0 22 0>mbz2jf_`ZdK_?nJb7dz2
l28
L18
VLihPPOY0@A4YAeZn5>^jX3
R7
32
R29
R30
R22
R28
R10
R11
!s100 [`h:MEoJ=eCjF:7giPjih1
Pfpmult_stagen_comp
R16
R1
R2
w1298622905
R4
8D:/Work/VHDL/encore/fpmult/src/fpmult_stageN_comp.vhdl
FD:/Work/VHDL/encore/fpmult/src/fpmult_stageN_comp.vhdl
l0
L6
VXEeJY3OH<`T5HG0=TD@in1
R7
32
R21
Z37 Mx2 4 ieee 11 numeric_std
Mx1 4 work 10 fp_generic
R10
R11
!s100 3RgfO?mR^8D^8?0PEJ`RX3
Etest_fpmult
Z38 w1298502644
R17
R1
R16
R2
R4
Z39 8D:/Work/VHDL/encore/fpmult/src/test_fpmult.vhdl
Z40 FD:/Work/VHDL/encore/fpmult/src/test_fpmult.vhdl
l0
L6
VQ7G_fPm1DPBAWY:afUiVV3
!s100 SC:maQ@BYF_[>52g]YRlL3
R7
32
R10
R11
Atestbench
R17
R1
R16
R2
Z41 DEx4 work 11 test_fpmult 0 22 Q7G_fPm1DPBAWY:afUiVV3
l13
L9
Z42 Vk_6azP<I9N:9[Dd_?@Jg@2
Z43 !s100 CST5S81[UFGE>6gd0HOdG2
R7
32
R29
R27
R37
Z44 Mx1 4 work 11 fpmult_comp
R10
R11
/encore/trunk/fpmult/simulation/modelsim/vsim.wlf Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream
encore/trunk/fpmult/simulation/modelsim/vsim.wlf Property changes : Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Index: encore/trunk/fpmult/simulation/modelsim/modelsim.ini =================================================================== --- encore/trunk/fpmult/simulation/modelsim/modelsim.ini (nonexistent) +++ encore/trunk/fpmult/simulation/modelsim/modelsim.ini (revision 6) @@ -0,0 +1,324 @@ +; Copyright 1991-2009 Mentor Graphics Corporation +; +; All Rights Reserved. +; +; THIS WORK CONTAINS TRADE SECRET AND PROPRIETARY INFORMATION WHICH IS THE PROPERTY OF +; MENTOR GRAPHICS CORPORATION OR ITS LICENSORS AND IS SUBJECT TO LICENSE TERMS. +; + +[Library] +others = $MODEL_TECH/../modelsim.ini + +; Altera Primitive libraries +; +; VHDL Section +; +; +; Verilog Section +; + +work = work +[vcom] +; VHDL93 variable selects language version as the default. +; Default is VHDL-2002. +; Value of 0 or 1987 for VHDL-1987. +; Value of 1 or 1993 for VHDL-1993. +; Default or value of 2 or 2002 for VHDL-2002. +; Default or value of 3 or 2008 for VHDL-2008. +VHDL93 = 2002 + +; Show source line containing error. Default is off. +; Show_source = 1 + +; Turn off unbound-component warnings. Default is on. +; Show_Warning1 = 0 + +; Turn off process-without-a-wait-statement warnings. Default is on. +; Show_Warning2 = 0 + +; Turn off null-range warnings. Default is on. +; Show_Warning3 = 0 + +; Turn off no-space-in-time-literal warnings. Default is on. +; Show_Warning4 = 0 + +; Turn off multiple-drivers-on-unresolved-signal warnings. Default is on. +; Show_Warning5 = 0 + +; Turn off optimization for IEEE std_logic_1164 package. Default is on. +; Optimize_1164 = 0 + +; Turn on resolving of ambiguous function overloading in favor of the +; "explicit" function declaration (not the one automatically created by +; the compiler for each type declaration). Default is off. +; The .ini file has Explicit enabled so that std_logic_signed/unsigned +; will match the behavior of synthesis tools. +Explicit = 1 + +; Turn off acceleration of the VITAL packages. Default is to accelerate. +; NoVital = 1 + +; Turn off VITAL compliance checking. Default is checking on. +; NoVitalCheck = 1 + +; Ignore VITAL compliance checking errors. Default is to not ignore. +; IgnoreVitalErrors = 1 + +; Turn off VITAL compliance checking warnings. Default is to show warnings. +; Show_VitalChecksWarnings = 0 + +; Keep silent about case statement static warnings. +; Default is to give a warning. +; NoCaseStaticError = 1 + +; Keep silent about warnings caused by aggregates that are not locally static. +; Default is to give a warning. +; NoOthersStaticError = 1 + +; Turn off inclusion of debugging info within design units. +; Default is to include debugging info. +; NoDebug = 1 + +; Turn off "Loading..." messages. Default is messages on. +; Quiet = 1 + +; Turn on some limited synthesis rule compliance checking. Checks only: +; -- signals used (read) by a process must be in the sensitivity list +; CheckSynthesis = 1 + +; Activate optimizations on expressions that do not involve signals, +; waits, or function/procedure/task invocations. Default is off. +; ScalarOpts = 1 + +; Require the user to specify a configuration for all bindings, +; and do not generate a compile time default binding for the +; component. This will result in an elaboration error of +; 'component not bound' if the user fails to do so. Avoids the rare +; issue of a false dependency upon the unused default binding. +; RequireConfigForAllDefaultBinding = 1 + +; Inhibit range checking on subscripts of arrays. Range checking on +; scalars defined with subtypes is inhibited by default. +; NoIndexCheck = 1 + +; Inhibit range checks on all (implicit and explicit) assignments to +; scalar objects defined with subtypes. +; NoRangeCheck = 1 + +[vlog] + +; Turn off inclusion of debugging info within design units. +; Default is to include debugging info. +; NoDebug = 1 + +; Turn off "loading..." messages. Default is messages on. +; Quiet = 1 + +; Turn on Verilog hazard checking (order-dependent accessing of global vars). +; Default is off. +; Hazard = 1 + +; Turn on converting regular Verilog identifiers to uppercase. Allows case +; insensitivity for module names. Default is no conversion. +; UpCase = 1 + +; Turn on incremental compilation of modules. Default is off. +; Incremental = 1 + +; Turns on lint-style checking. +; Show_Lint = 1 + +[vsim] +; Simulator resolution +; Set to fs, ps, ns, us, ms, or sec with optional prefix of 1, 10, or 100. +Resolution = ps + +; User time unit for run commands +; Set to default, fs, ps, ns, us, ms, or sec. The default is to use the +; unit specified for Resolution. For example, if Resolution is 100ps, +; then UserTimeUnit defaults to ps. +; Should generally be set to default. +UserTimeUnit = default + +; Default run length +RunLength = 100 + +; Maximum iterations that can be run without advancing simulation time +IterationLimit = 5000 + +; Directive to license manager: +; vhdl Immediately reserve a VHDL license +; vlog Immediately reserve a Verilog license +; plus Immediately reserve a VHDL and Verilog license +; nomgc Do not look for Mentor Graphics Licenses +; nomti Do not look for Model Technology Licenses +; noqueue Do not wait in the license queue when a license isn't available +; viewsim Try for viewer license but accept simulator license(s) instead +; of queuing for viewer license +; License = plus + +; Stop the simulator after a VHDL/Verilog assertion message +; 0 = Note 1 = Warning 2 = Error 3 = Failure 4 = Fatal +BreakOnAssertion = 3 + +; Assertion Message Format +; %S - Severity Level +; %R - Report Message +; %T - Time of assertion +; %D - Delta +; %I - Instance or Region pathname (if available) +; %% - print '%' character +; AssertionFormat = "** %S: %R\n Time: %T Iteration: %D%I\n" + +; Assertion File - alternate file for storing VHDL/Verilog assertion messages +; AssertFile = assert.log + +; Default radix for all windows and commands... +; Set to symbolic, ascii, binary, octal, decimal, hex, unsigned +DefaultRadix = hexadecimal + +; VSIM Startup command +; Startup = do startup.do + +; File for saving command transcript +TranscriptFile = transcript + +; File for saving command history +; CommandHistory = cmdhist.log + +; Specify whether paths in simulator commands should be described +; in VHDL or Verilog format. +; For VHDL, PathSeparator = / +; For Verilog, PathSeparator = . +; Must not be the same character as DatasetSeparator. +PathSeparator = / + +; Specify the dataset separator for fully rooted contexts. +; The default is ':'. For example, sim:/top +; Must not be the same character as PathSeparator. +DatasetSeparator = : + +; Disable VHDL assertion messages +; IgnoreNote = 1 +; IgnoreWarning = 1 +; IgnoreError = 1 +; IgnoreFailure = 1 + +; Default force kind. May be freeze, drive, deposit, or default +; or in other terms, fixed, wired, or charged. +; A value of "default" will use the signal kind to determine the +; force kind, drive for resolved signals, freeze for unresolved signals +; DefaultForceKind = freeze + +; If zero, open files when elaborated; otherwise, open files on +; first read or write. Default is 0. +; DelayFileOpen = 1 + +; Control VHDL files opened for write. +; 0 = Buffered, 1 = Unbuffered +UnbufferedOutput = 0 + +; Control the number of VHDL files open concurrently. +; This number should always be less than the current ulimit +; setting for max file descriptors. +; 0 = unlimited +ConcurrentFileLimit = 40 + +; Control the number of hierarchical regions displayed as +; part of a signal name shown in the Wave window. +; A value of zero tells VSIM to display the full name. +; The default is 0. +; WaveSignalNameWidth = 0 + +; Turn off warnings from the std_logic_arith, std_logic_unsigned +; and std_logic_signed packages. +; StdArithNoWarnings = 1 + +; Turn off warnings from the IEEE numeric_std and numeric_bit packages. +; NumericStdNoWarnings = 1 + +; Control the format of the (VHDL) FOR generate statement label +; for each iteration. Do not quote it. +; The format string here must contain the conversion codes %s and %d, +; in that order, and no other conversion codes. The %s represents +; the generate_label; the %d represents the generate parameter value +; at a particular generate iteration (this is the position number if +; the generate parameter is of an enumeration type). Embedded whitespace +; is allowed (but discouraged); leading and trailing whitespace is ignored. +; Application of the format must result in a unique scope name over all +; such names in the design so that name lookup can function properly. +; GenerateFormat = %s__%d + +; Specify whether checkpoint files should be compressed. +; The default is 1 (compressed). +; CheckpointCompressMode = 0 + +; List of dynamically loaded objects for Verilog PLI applications +; Veriuser = veriuser.sl + +; Specify default options for the restart command. Options can be one +; or more of: -force -nobreakpoint -nolist -nolog -nowave +; DefaultRestartOptions = -force + +; HP-UX 10.20 ONLY - Enable memory locking to speed up large designs +; (> 500 megabyte memory footprint). Default is disabled. +; Specify number of megabytes to lock. +; LockedMemory = 1000 + +; Turn on (1) or off (0) WLF file compression. +; The default is 1 (compress WLF file). +; WLFCompress = 0 + +; Specify whether to save all design hierarchy (1) in the WLF file +; or only regions containing logged signals (0). +; The default is 0 (save only regions with logged signals). +; WLFSaveAllRegions = 1 + +; WLF file time limit. Limit WLF file by time, as closely as possible, +; to the specified amount of simulation time. When the limit is exceeded +; the earliest times get truncated from the file. +; If both time and size limits are specified the most restrictive is used. +; UserTimeUnits are used if time units are not specified. +; The default is 0 (no limit). Example: WLFTimeLimit = {100 ms} +; WLFTimeLimit = 0 + +; WLF file size limit. Limit WLF file size, as closely as possible, +; to the specified number of megabytes. If both time and size limits +; are specified then the most restrictive is used. +; The default is 0 (no limit). +; WLFSizeLimit = 1000 + +; Specify whether or not a WLF file should be deleted when the +; simulation ends. A value of 1 will cause the WLF file to be deleted. +; The default is 0 (do not delete WLF file when simulation ends). +; WLFDeleteOnQuit = 1 + +; Automatic SDF compilation +; Disables automatic compilation of SDF files in flows that support it. +; Default is on, uncomment to turn off. +; NoAutoSDFCompile = 1 + +[lmc] + +[msg_system] +; Change a message severity or suppress a message. +; The format is: = [,...] +; Examples: +; note = 3009 +; warning = 3033 +; error = 3010,3016 +; fatal = 3016,3033 +; suppress = 3009,3016,3043 +; The command verror can be used to get the complete +; description of a message. + +; Control transcripting of elaboration/runtime messages. +; The default is to have messages appear in the transcript and +; recorded in the wlf file (messages that are recorded in the +; wlf file can be viewed in the MsgViewer). The other settings +; are to send messages only to the transcript or only to the +; wlf file. The valid values are +; both {default} +; tran {transcript only} +; wlf {wlf file only} +; msgmode = both Index: encore/trunk/fpmult/src/fpmult_generic.vhdl =================================================================== --- encore/trunk/fpmult/src/fpmult_generic.vhdl (revision 5) +++ encore/trunk/fpmult/src/fpmult_generic.vhdl (nonexistent) @@ -1,21 +0,0 @@ -library ieee; -use ieee.std_logic_1164.all; - -package fpmult_generic is - -subtype fp_status_type is std_logic_vector(2 downto 0); -constant ZERO:fp_status_type:="000"; -constant NORMAL:fp_status_type:="001"; -constant SUBNORMAL:fp_status_type:="010"; -constant INFINITY:fp_status_type:="011"; -constant NAN:fp_status_type:="100"; -constant SIGNALLING_NAN:fp_status_type:="101"; -constant QUIET_NAN:fp_status_type:="110"; - --- type fp_status_type is (ZERO, NORMAL, INFINITY, NAN); - --- type fp_status_encoding_array_type is array(fp_status_type) of std_logic_vector(1 downto 0); - --- constant fp_status_encoding_array : fp_status_encoding_array_type := ( ZERO => "00", NORMAL => "01", INFINITY => "10", NAN => "11"); - -end package; \ No newline at end of file Index: encore/trunk/fpmult/src/fpmult_comp.vhdl =================================================================== --- encore/trunk/fpmult/src/fpmult_comp.vhdl (revision 5) +++ encore/trunk/fpmult/src/fpmult_comp.vhdl (revision 6) @@ -1,14 +1,15 @@ library ieee; use ieee.std_logic_1164.all; +use work.fp_generic.all; package fpmult_comp is type fpmult_in_type is record - a:std_logic_vector(22 downto 0); - b:std_logic_vector(22 downto 0); + a:fp_type; + b:fp_type; end record; type fpmult_out_type is record - p:std_logic_vector(22 downto 0); + p:fp_type; end record; component fpmult is
/encore/trunk/fpmult/src/fpmult_stageN_comp.vhdl
1,29 → 1,28
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
use work.fp_generic.all;
use work.fpmult_generic.all;
 
package fpmult_stageN_comp is
type fpmult_stageN_in_type is record
a:fp_type;
b:fp_type;
 
p_sign:fp_sign_type;
p_exp:fp_exp_type;
p_mantissa:fp_long_mantissa_type;
end record;
 
alias fpmult_stageN_out_type is fpmult_stageN_in_type;
 
component fpmult_stageN is
generic(
N:integer
);
port(
clk:in std_logic;
d:in fpmult_stageN_in_type;
q:out fpmult_stageN_out_type
);
end component;
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
use work.fp_generic.all;
 
package fpmult_stageN_comp is
type fpmult_stageN_in_type is record
a:fp_type;
b:fp_type;
 
p_sign:fp_sign_type;
p_exp:fp_exp_type;
p_mantissa:fp_long_mantissa_type;
end record;
 
alias fpmult_stageN_out_type is fpmult_stageN_in_type;
 
component fpmult_stageN is
generic(
N:integer
);
port(
clk:in std_logic;
d:in fpmult_stageN_in_type;
q:out fpmult_stageN_out_type
);
end component;
end package;
/encore/trunk/fpmult/src/fpmult_stage0_comp.vhdl
1,23 → 1,22
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
use work.fp_generic.all;
use work.fpmult_generic.all;
use work.fpmult_stageN_comp.all;
 
package fpmult_stage0_comp is
type fpmult_stage0_in_type is record
a:fp_type;
b:fp_type;
end record;
 
alias fpmult_stage0_out_type is fpmult_stageN_in_type;
 
component fpmult_stage0 is
port(
clk:in std_logic;
d:in fpmult_stage0_in_type;
q:out fpmult_stage0_out_type
);
end component;
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
use work.fp_generic.all;
use work.fpmult_stageN_comp.all;
 
package fpmult_stage0_comp is
type fpmult_stage0_in_type is record
a:fp_type;
b:fp_type;
end record;
 
alias fpmult_stage0_out_type is fpmult_stageN_in_type;
 
component fpmult_stage0 is
port(
clk:in std_logic;
d:in fpmult_stage0_in_type;
q:out fpmult_stage0_out_type
);
end component;
end package;
/encore/trunk/fpmult/src/fp_generic.vhdl
1,89 → 1,99
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
 
package fp_generic is
 
subtype fp_type is std_logic_vector(31 downto 0);
subtype fp_sign_type is std_logic;
subtype fp_exp_type is unsigned(7 downto 0);
subtype fp_mantissa_type is unsigned(23 downto 0);
subtype fp_long_mantissa_type is unsigned(47 downto 0);
 
subtype fp_error_type is std_logic_vector(5 downto 0);
constant FP_ERR_INVALID:fp_error_type:="000001";
constant FP_ERR_DIVBYZERO:fp_error_type:="000100";
constant FP_ERR_OVERFLOW:fp_error_type:="001000";
constant FP_ERR_UNDERFLOW:fp_error_type:="010000";
constant FP_ERR_INEXACT:fp_error_type:="100000";
 
function fp_sign(fp:fp_type) return fp_sign_type;
function fp_exp(fp:fp_type) return fp_exp_type;
function fp_mantissa(fp:fp_type) return fp_mantissa_type;
 
function fp_is_normal(fp:fp_type) return boolean;
function fp_is_zero(fp:fp_type) return boolean;
function fp_is_subnormal(fp:fp_type) return boolean;
function fp_is_infinite(fp:fp_type) return boolean;
function fp_is_nan(fp:fp_type) return boolean;
function fp_is_signalling(fp:fp_type) return boolean;
function fp_is_quiet(fp:fp_type) return boolean;
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
 
end package;
 
package body fp_generic is
 
function fp_sign(fp:fp_type) return fp_sign_type is
begin
return fp(31);
end function fp_sign;
 
function fp_exp(fp:fp_type) return fp_exp_type is
begin
return unsigned(fp(30 downto 23));
end function fp_exp;
 
function fp_mantissa(fp:fp_type) return fp_mantissa_type is
begin
return unsigned("1"&fp(22 downto 0)); -- Prepend implied '1' bit of IEEE-754 mantissa in order to return a 24 bit entity
end function fp_mantissa;
 
function fp_is_normal(fp:fp_type) return boolean is
variable e:fp_exp_type;
begin
e:=fp_exp(fp);
 
return (e/=(others=>'0')) and (e/=(others=>'1'));
end function fp_is_normal;
 
function fp_is_zero(fp:fp_type) return boolean is
begin
return (unsigned(fp_exp(fp))=0) and (unsigned(fp_mantissa(fp))=0);
end function fp_is_zero;
 
function fp_is_subnormal(fp:fp_type) return boolean is
begin
return (fp_exp(fp)=(others=>'0')) and (fp_mantissa(fp)/=(others=>'0'));
end function fp_is_subnormal;
 
function fp_is_infinite(fp:fp_type) return boolean is
begin
return (fp_exp(fp)=(others=>'1')) and (fp_mantissa(fp)=(others=>'0'));
end function fp_is_infinite;
 
function fp_is_nan(fp:fp_type) return boolean is
begin
return (fp_exp(fp)=(others=>'1')) and (fp_mantissa(fp)/=(others=>'0'));
end function fp_is_nan;
 
function fp_is_signalling(fp:fp_type) return boolean is
begin
return fp_is_nan(fp) and fp_mantissa(fp)(22)='0';
end function fp_is_signalling;
 
function fp_is_quiet(fp:fp_type) return boolean is
begin
return fp_is_nan(fp) and fp_mantissa(fp)(22)='1';
end function fp_is_quiet;
 
end package body fp_generic;
package fp_generic is
 
subtype fp_type is std_logic_vector(31 downto 0);
subtype fp_sign_type is std_logic;
subtype fp_exp_type is unsigned(7 downto 0);
subtype fp_mantissa_type is unsigned(23 downto 0);
subtype fp_long_mantissa_type is unsigned(47 downto 0);
 
subtype fp_error_type is std_logic_vector(5 downto 0);
constant FP_ERR_INVALID:fp_error_type:="000001";
constant FP_ERR_DIVBYZERO:fp_error_type:="000100";
constant FP_ERR_OVERFLOW:fp_error_type:="001000";
constant FP_ERR_UNDERFLOW:fp_error_type:="010000";
constant FP_ERR_INEXACT:fp_error_type:="100000";
 
function fp_sign(fp:fp_type) return fp_sign_type;
function fp_exp(fp:fp_type) return fp_exp_type;
function fp_mantissa(fp:fp_type) return fp_mantissa_type;
 
function fp_is_normal(fp:fp_type) return boolean;
function fp_is_zero(fp:fp_type) return boolean;
function fp_is_subnormal(fp:fp_type) return boolean;
function fp_is_infinite(fp:fp_type) return boolean;
function fp_is_nan(fp:fp_type) return boolean;
function fp_is_signalling(fp:fp_type) return boolean;
function fp_is_quiet(fp:fp_type) return boolean;
 
end package;
 
package body fp_generic is
 
function fp_sign(fp:fp_type) return fp_sign_type is
begin
return fp(31);
end function fp_sign;
 
function fp_exp(fp:fp_type) return fp_exp_type is
begin
return(resize((unsigned(fp) srl 23),8));
end function fp_exp;
 
function fp_mantissa(fp:fp_type) return fp_mantissa_type is
begin
return(fp_mantissa_type("1"&fp(22 downto 0))); -- Prepend implied '1' bit of IEEE-754 mantissa in order to return a 24 bit entity
end function fp_mantissa;
 
function fp_exp_is_min(exp:fp_exp_type) return boolean is
begin
return (exp=0);
end function fp_exp_is_min;
 
function fp_exp_is_max(exp:fp_exp_type) return boolean is
begin
return (exp=255);
end function fp_exp_is_max;
 
function fp_is_normal(fp:fp_type) return boolean is
variable exp:fp_exp_type;
begin
exp:=fp_exp(fp);
 
return not fp_exp_is_min(exp) and not fp_exp_is_max(exp);
end function fp_is_normal;
 
function fp_is_zero(fp:fp_type) return boolean is
begin
return (fp_exp(fp)=0) and (fp_mantissa(fp)=0);
end function fp_is_zero;
 
function fp_is_subnormal(fp:fp_type) return boolean is
begin
return (fp_exp(fp)=0) and (fp_mantissa(fp)/=0);
end function fp_is_subnormal;
 
function fp_is_infinite(fp:fp_type) return boolean is
begin
return (fp_exp_is_max(fp_exp(fp))) and (fp_mantissa(fp)=0);
end function fp_is_infinite;
 
function fp_is_nan(fp:fp_type) return boolean is
begin
return (fp_exp_is_max(fp_exp(fp))) and (fp_mantissa(fp)/=0);
end function fp_is_nan;
 
function fp_is_signalling(fp:fp_type) return boolean is
begin
return fp_is_nan(fp) and fp_mantissa(fp)(22)='0';
end function fp_is_signalling;
 
function fp_is_quiet(fp:fp_type) return boolean is
begin
return fp_is_nan(fp) and fp_mantissa(fp)(22)='1';
end function fp_is_quiet;
 
end package body fp_generic;
/encore/trunk/fpmult/src/test_fpmult.vhdl
0,0 → 1,30
library ieee;
use ieee.std_logic_1164.all;
use work.fp_generic.all;
use work.fpmult_comp.all;
 
entity test_fpmult is
end;
 
architecture testbench of test_fpmult is
signal clk:std_logic:='0';
signal d:fpmult_in_type;
signal q:fpmult_out_type;
begin
 
dut:fpmult port map(clk,d,q);
 
clock:process
begin
wait for 10 ns; clk <= not clk;
end process clock;
 
stimulus:process
begin
d.a<="00111111110110010100011101010101"; -- 0x3FD94755 -> 1.69748938
d.b<="00111111101101110110110011100001"; -- 0x3FB76CE1 -> 1.43301022
wait;
end process stimulus;
 
end testbench;
 
/encore/trunk/fpmult/src/fpmult.vhdl
1,94 → 1,43
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
--use work.fpmult_comp.all;
use work.fpmult_stage0_comp.all;
use work.fpmult_stageN_comp.all;
use work.fpmult_stage23_comp.all;
 
entity fpmult is
port(
clk:in std_logic;
 
a:in std_logic_vector(31 downto 0);
b:in std_logic_vector(31 downto 0);
p:out std_logic_vector(31 downto 0);
 
p_s00:out std_logic_vector(23 downto 1);
p_s01:out std_logic_vector(25 downto 1);
p_s02:out std_logic_vector(26 downto 2);
p_s03:out std_logic_vector(27 downto 3);
p_s04:out std_logic_vector(28 downto 4);
p_s05:out std_logic_vector(29 downto 5);
p_s06:out std_logic_vector(30 downto 6);
p_s07:out std_logic_vector(31 downto 7);
p_s08:out std_logic_vector(32 downto 8);
p_s09:out std_logic_vector(33 downto 9);
p_s10:out std_logic_vector(34 downto 10);
p_s11:out std_logic_vector(35 downto 11);
p_s12:out std_logic_vector(36 downto 12);
p_s13:out std_logic_vector(37 downto 13);
p_s14:out std_logic_vector(38 downto 14);
p_s15:out std_logic_vector(39 downto 15);
p_s16:out std_logic_vector(40 downto 16);
p_s17:out std_logic_vector(41 downto 17);
p_s18:out std_logic_vector(42 downto 18);
p_s19:out std_logic_vector(43 downto 19);
p_s20:out std_logic_vector(44 downto 20);
p_s21:out std_logic_vector(45 downto 21);
p_s22:out std_logic_vector(46 downto 22)
);
end;
 
architecture structural of fpmult is
signal fpmult_stage0_in:fpmult_stage0_in_type;
signal fpmult_stage0_out:fpmult_stage0_out_type;
signal fpmult_stage23_in:fpmult_stage23_in_type;
signal fpmult_stage23_out:fpmult_stage23_out_type;
type fpmult_stageN_in_array_type is array(23 downto 1) of fpmult_stageN_in_type;
type fpmult_stageN_out_array_type is array(22 downto 1) of fpmult_stageN_out_type;
signal fpmult_stageN_in_array:fpmult_stageN_in_array_type;
signal fpmult_stageN_out_array:fpmult_stageN_out_array_type;
begin
fpmult_stage0_in.a<=a;
fpmult_stage0_in.b<=b;
 
stage0:fpmult_stage0 port map(clk,fpmult_stage0_in,fpmult_stage0_out);
 
fpmult_stageN_in_array(1)<=fpmult_stage0_out;
pipeline:for N in 22 downto 1 generate
stageN:fpmult_stageN generic map(N) port map(clk,fpmult_stageN_in_array(N),fpmult_stageN_out_array(N));
fpmult_stageN_in_array(N+1)<=fpmult_stageN_out_array(N);
end generate pipeline;
 
fpmult_stage23_in<=fpmult_stageN_out_array(22);
 
stage23:fpmult_stage23 port map(clk,fpmult_stage23_in,fpmult_stage23_out);
 
p<=fpmult_stage23_out.p;
p_s00<=std_logic_vector(fpmult_stage0_out.p_mantissa(23 downto 1));
p_s01<=std_logic_vector(fpmult_stageN_out_array(1).p_mantissa(25 downto 1));
p_s02<=std_logic_vector(fpmult_stageN_out_array(2).p_mantissa(26 downto 2));
p_s03<=std_logic_vector(fpmult_stageN_out_array(3).p_mantissa(27 downto 3));
p_s04<=std_logic_vector(fpmult_stageN_out_array(4).p_mantissa(28 downto 4));
p_s05<=std_logic_vector(fpmult_stageN_out_array(5).p_mantissa(29 downto 5));
p_s06<=std_logic_vector(fpmult_stageN_out_array(6).p_mantissa(30 downto 6));
p_s07<=std_logic_vector(fpmult_stageN_out_array(7).p_mantissa(31 downto 7));
p_s08<=std_logic_vector(fpmult_stageN_out_array(8).p_mantissa(32 downto 8));
p_s09<=std_logic_vector(fpmult_stageN_out_array(9).p_mantissa(33 downto 9));
p_s10<=std_logic_vector(fpmult_stageN_out_array(10).p_mantissa(34 downto 10));
p_s11<=std_logic_vector(fpmult_stageN_out_array(11).p_mantissa(35 downto 11));
p_s12<=std_logic_vector(fpmult_stageN_out_array(12).p_mantissa(36 downto 12));
p_s13<=std_logic_vector(fpmult_stageN_out_array(13).p_mantissa(37 downto 13));
p_s14<=std_logic_vector(fpmult_stageN_out_array(14).p_mantissa(38 downto 14));
p_s15<=std_logic_vector(fpmult_stageN_out_array(15).p_mantissa(39 downto 15));
p_s16<=std_logic_vector(fpmult_stageN_out_array(16).p_mantissa(40 downto 16));
p_s17<=std_logic_vector(fpmult_stageN_out_array(17).p_mantissa(41 downto 17));
p_s18<=std_logic_vector(fpmult_stageN_out_array(18).p_mantissa(42 downto 18));
p_s19<=std_logic_vector(fpmult_stageN_out_array(19).p_mantissa(43 downto 19));
p_s20<=std_logic_vector(fpmult_stageN_out_array(20).p_mantissa(44 downto 20));
p_s21<=std_logic_vector(fpmult_stageN_out_array(21).p_mantissa(45 downto 21));
p_s22<=std_logic_vector(fpmult_stageN_out_array(22).p_mantissa(46 downto 22));
end;
library ieee;
use ieee.std_logic_1164.all;
use work.fpmult_comp.all;
use work.fpmult_stage0_comp.all;
use work.fpmult_stageN_comp.all;
use work.fpmult_stage23_comp.all;
 
entity fpmult is
port(
clk:in std_logic;
d:in fpmult_in_type;
q:out fpmult_out_type
);
end;
 
architecture structural of fpmult is
signal fpmult_stage0_in:fpmult_stage0_in_type;
signal fpmult_stage0_out:fpmult_stage0_out_type;
signal fpmult_stage23_in:fpmult_stage23_in_type;
signal fpmult_stage23_out:fpmult_stage23_out_type;
type fpmult_stageN_in_array_type is array(23 downto 1) of fpmult_stageN_in_type;
type fpmult_stageN_out_array_type is array(22 downto 1) of fpmult_stageN_out_type;
signal fpmult_stageN_in_array:fpmult_stageN_in_array_type;
signal fpmult_stageN_out_array:fpmult_stageN_out_array_type;
begin
fpmult_stage0_in.a<=d.a;
fpmult_stage0_in.b<=d.b;
 
stage0:fpmult_stage0 port map(clk,fpmult_stage0_in,fpmult_stage0_out);
 
fpmult_stageN_in_array(1)<=fpmult_stage0_out;
pipeline:for N in 22 downto 1 generate
stageN:fpmult_stageN generic map(N) port map(clk,fpmult_stageN_in_array(N),fpmult_stageN_out_array(N));
fpmult_stageN_in_array(N+1)<=fpmult_stageN_out_array(N);
end generate pipeline;
 
fpmult_stage23_in<=fpmult_stageN_out_array(22);
 
stage23:fpmult_stage23 port map(clk,fpmult_stage23_in,fpmult_stage23_out);
 
q.p<=fpmult_stage23_out.p;
end;
/encore/trunk/fpmult/src/fpmult_stage0.vhdl
25,6 → 25,15
begin
comb:process(d,r)
variable v:reg_type;
variable a_is_normal,b_is_normal:boolean;
variable a_is_subnormal,b_is_subnormal:boolean;
variable a_is_zero,b_is_zero:boolean;
variable a_is_infinite,b_is_infinite:boolean;
variable a_is_nan,b_is_nan:boolean;
variable is_normal:boolean;
variable is_zero:boolean;
variable is_infinite:boolean;
variable is_nan:boolean;
begin
-- sample register outputs
v:=r;
33,6 → 42,32
v.a:=d.a;
v.b:=d.b;
 
a_is_normal:=fp_is_normal(v.a);
b_is_normal:=fp_is_normal(v.b);
a_is_subnormal:=fp_is_subnormal(v.a);
b_is_subnormal:=fp_is_subnormal(v.b);
a_is_zero:=fp_is_zero(v.a);
b_is_zero:=fp_is_zero(v.b);
a_is_infinite:=fp_is_infinite(v.a);
b_is_infinite:=fp_is_infinite(v.b);
a_is_nan:=fp_is_nan(v.a);
b_is_nan:=fp_is_nan(v.b);
 
if a_is_normal or b_is_normal then
if a_is_normal and b_is_normal then
is_normal:=true;
end if;
if a_is_zero or b_is_zero then
is_zero:=true;
end if;
if a_is_infinite or b_is_infinite then
is_infinite:=true;
end if;
if a_is_nan or b_is_nan then
is_nan:=true;
end if;
end if;
v.p_sign:=fp_sign(d.a) xor fp_sign(d.b);
v.p_exp:=fp_exp(d.a) + fp_exp(d.b) - 127;
if fp_mantissa(d.b)(0)='1' then
/encore/trunk/fpmult/src/fpmult_stage23_comp.vhdl
1,22 → 1,21
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
use work.fp_generic.all;
use work.fpmult_generic.all;
use work.fpmult_stageN_comp.all;
 
package fpmult_stage23_comp is
alias fpmult_stage23_in_type is fpmult_stageN_out_type;
 
type fpmult_stage23_out_type is record
p:fp_type;
end record;
 
component fpmult_stage23 is
port(
clk:in std_logic;
d:in fpmult_stage23_in_type;
q:out fpmult_stage23_out_type
);
end component;
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
use work.fp_generic.all;
use work.fpmult_stageN_comp.all;
 
package fpmult_stage23_comp is
alias fpmult_stage23_in_type is fpmult_stageN_out_type;
 
type fpmult_stage23_out_type is record
p:fp_type;
end record;
 
component fpmult_stage23 is
port(
clk:in std_logic;
d:in fpmult_stage23_in_type;
q:out fpmult_stage23_out_type
);
end component;
end package;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.