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

Subversion Repositories gecko3

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /gecko3/trunk
    from Rev 28 to Rev 29
    Reverse comparison

Rev 28 → Rev 29

/GECKO3COM/gecko3com-ip/core/GECKO3COM_simple.ise Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream
/GECKO3COM/gecko3com-ip/core/gpif_com_fsm.vhd
200,7 → 200,8
elsif i_WRU = '1' and i_RDYU = '0' then
nx_state <= inRQ;
elsif i_WRU = '0' and
(i_X2U_FULL_IFCLK = '1' or i_EOM = '1') and i_X2U_EMPTY = '0' then
--(i_X2U_FULL_IFCLK = '1' or i_EOM = '1') and i_X2U_EMPTY = '0' then
i_X2U_EMPTY = '0' then
nx_state <= outRQ;
else
nx_state <= idle;
381,6 → 382,7
nx_state <= rst;
elsif i_WRU = '0' and i_RDYU = '1' then
nx_state <= outTrans;
s_X2U_RD_EN <= '1';
else
nx_state <= outACKwait;
end if;
404,6 → 406,7
nx_state <= outTrans;
else
nx_state <= outUSBwait;
s_X2U_RD_EN <= '0';
end if;
 
when outUSBwait =>
424,12 → 427,12
else
nx_state <= outUSBwait;
end if;
 
when outUSBwaitEnd =>
-- output signal values:
s_WRX <= '1';
s_RDYX <= '1';
s_X2U_RD_EN <= '0';
s_RDYX <= '0';
s_X2U_RD_EN <= '1';
o_TX <= '1';
s_bus_trans_dir <= writeToGPIF;
 
451,6 → 454,7
nx_state <= endOutTrans;
elsif i_X2U_EMPTY = '0' then
nx_state <= outTrans;
s_X2U_RD_EN <= '1';
else
nx_state <= outFIFOwait;
end if;
/GECKO3COM/gecko3com-ip/core/GECKO3COM_simple_prng_tb.txt
0,0 → 1,7

/GECKO3COM/gecko3com-ip/core/GECKO3COM_simple_prng_tb.hex Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream
GECKO3COM/gecko3com-ip/core/GECKO3COM_simple_prng_tb.hex Property changes : Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Index: GECKO3COM/gecko3com-ip/core/GECKO3COM_simple_prng_tb.wcfg =================================================================== --- GECKO3COM/gecko3com-ip/core/GECKO3COM_simple_prng_tb.wcfg (nonexistent) +++ GECKO3COM/gecko3com-ip/core/GECKO3COM_simple_prng_tb.wcfg (revision 29) @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + sim_clk + sim_clk + + + sim_rst + sim_rst + + + s_prng_en + s_prng_en + + + s_prng_feedback + s_prng_feedback + + + s_prng_data[31:0] + s_prng_data[31:0] + HEXRADIX + true + #0000ff + + Index: GECKO3COM/gecko3com-ip/core/GECKO3COM_simple_test.vhd =================================================================== --- GECKO3COM/gecko3com-ip/core/GECKO3COM_simple_test.vhd (revision 28) +++ GECKO3COM/gecko3com-ip/core/GECKO3COM_simple_test.vhd (revision 29) @@ -82,8 +82,8 @@ -- we will transmitt 1 MiB data when the pseude random number generator -- is used: - --signal c_transfer_size_prng : std_logic_vector(31 downto 0) := x"00100000"; - signal c_transfer_size_prng : std_logic_vector(31 downto 0) := x"00000001"; + signal c_transfer_size_prng : std_logic_vector(31 downto 0) := x"00100000"; + --signal c_transfer_size_prng : std_logic_vector(31 downto 0) := x"00000001"; -----------------------------------------------------------------------------
/GECKO3COM/gecko3com-ip/core/GECKO3COM_simple.xise
46,35 → 46,27
<association xil_pn:name="PostTranslateSimulation"/>
</file>
<file xil_pn:name="GECKO3COM_simple.vhd" xil_pn:type="FILE_VHDL">
<association xil_pn:name="BehavioralSimulation"/>
<association xil_pn:name="Implementation"/>
</file>
<file xil_pn:name="coregenerator/coregenerator_fifo_receive.xco" xil_pn:type="FILE_COREGEN">
<association xil_pn:name="BehavioralSimulation"/>
<association xil_pn:name="Implementation"/>
</file>
<file xil_pn:name="coregenerator/coregenerator_fifo_send.xco" xil_pn:type="FILE_COREGEN">
<association xil_pn:name="BehavioralSimulation"/>
<association xil_pn:name="Implementation"/>
</file>
<file xil_pn:name="fifo_receive.vhd" xil_pn:type="FILE_VHDL">
<association xil_pn:name="BehavioralSimulation"/>
<association xil_pn:name="Implementation"/>
</file>
<file xil_pn:name="fifo_send.vhd" xil_pn:type="FILE_VHDL">
<association xil_pn:name="BehavioralSimulation"/>
<association xil_pn:name="Implementation"/>
</file>
<file xil_pn:name="GECKO3COM_simple_datapath.vhd" xil_pn:type="FILE_VHDL">
<association xil_pn:name="BehavioralSimulation"/>
<association xil_pn:name="Implementation"/>
</file>
<file xil_pn:name="GECKO3COM_simple_fsm.vhd" xil_pn:type="FILE_VHDL">
<association xil_pn:name="BehavioralSimulation"/>
<association xil_pn:name="Implementation"/>
</file>
<file xil_pn:name="GECKO3COM_simple_test.vhd" xil_pn:type="FILE_VHDL">
<association xil_pn:name="BehavioralSimulation"/>
<association xil_pn:name="Implementation"/>
</file>
<file xil_pn:name="coregenerator/coregenerator_fifo_dualclock.xco" xil_pn:type="FILE_COREGEN">
84,10 → 76,16
<file xil_pn:name="GECKO3COM_simple_test.ucf" xil_pn:type="FILE_UCF">
<association xil_pn:name="Implementation"/>
</file>
<file xil_pn:name="GECKO3COM_simple_test.cdc" xil_pn:type="FILE_CDC">
<file xil_pn:name="GECKO3main_v1.ucf" xil_pn:type="FILE_UCF">
<association xil_pn:name="Implementation"/>
</file>
<file xil_pn:name="GECKO3main_v1.ucf" xil_pn:type="FILE_UCF">
<file xil_pn:name="GECKO3COM_simple_prng_tb.vhd" xil_pn:type="FILE_VHDL">
<association xil_pn:name="BehavioralSimulation"/>
<association xil_pn:name="PostRouteSimulation"/>
<association xil_pn:name="PostMapSimulation"/>
<association xil_pn:name="PostTranslateSimulation"/>
</file>
<file xil_pn:name="GECKO3COM_simple_test.cdc" xil_pn:type="FILE_CDC">
<association xil_pn:name="Implementation"/>
</file>
<file xil_pn:name="coregenerator/coregenerator_fifo_receive.ise" xil_pn:type="FILE_COREGENISE">
107,6 → 105,7
<property xil_pn:name="Command line syntax" xil_pn:value="emacsclient +$2 $1"/>
<property xil_pn:name="Compiled Library Directory" xil_pn:value="lib"/>
<property xil_pn:name="Constraints Entry" xil_pn:value="Constraints Editor"/>
<property xil_pn:name="Custom Project Filename Behavioral" xil_pn:value="GECKO3COM_simple_prng_tb_beh.prj"/>
<property xil_pn:name="Device" xil_pn:value="xc3s4000"/>
<property xil_pn:name="Device Family" xil_pn:value="Spartan3"/>
<property xil_pn:name="Editor" xil_pn:value="Custom"/>
124,7 → 123,7
<property xil_pn:name="Optimization Goal" xil_pn:value="Speed" xil_pn:x_locked="true"/>
<property xil_pn:name="Optimization Strategy (Cover Mode)" xil_pn:value="Speed"/>
<property xil_pn:name="Overwrite Compiled Libraries" xil_pn:value="true"/>
<property xil_pn:name="PROP_BehavioralSimTop" xil_pn:value="Architecture|GECKO3COM_simple|Behavioral"/>
<property xil_pn:name="PROP_BehavioralSimTop" xil_pn:value="Architecture|GECKO3COM_simple_prng_tb|simulation"/>
<property xil_pn:name="PROP_DesignName" xil_pn:value="usb_tmc_com"/>
<property xil_pn:name="PROP_mapSmartGuideFileName" xil_pn:value=""/>
<property xil_pn:name="PROP_parSmartGuideFileName" xil_pn:value=""/>
144,7 → 143,7
<property xil_pn:name="Report Unconstrained Paths Post Trace" xil_pn:value="yes"/>
<property xil_pn:name="Router Effort Level (Overrides Overall Level)" xil_pn:value="High" xil_pn:x_locked="true"/>
<property xil_pn:name="Safe Implementation" xil_pn:value="Yes"/>
<property xil_pn:name="Selected Simulation Root Source Node Behavioral" xil_pn:value="Architecture|GECKO3COM_simple|Behavioral"/>
<property xil_pn:name="Selected Simulation Root Source Node Behavioral" xil_pn:value="Architecture|GECKO3COM_simple_prng_tb|simulation"/>
<property xil_pn:name="Selected Simulation Root Source Node Post-Route" xil_pn:value="Architecture|gpif_com_test_tb|simulation"/>
<property xil_pn:name="Selected Simulation Source Node" xil_pn:value="DUT"/>
<property xil_pn:name="Simulation Resolution" xil_pn:value="1 ns"/>
161,8 → 160,8
 
<bindings>
<binding xil_pn:location="/gpif_com_test" xil_pn:name="GECKO3COM_simple_test.ucf"/>
<binding xil_pn:location="/GECKO3COM_simple_test" xil_pn:name="GECKO3main_v1.ucf"/>
<binding xil_pn:location="/GECKO3COM_simple_test" xil_pn:name="GECKO3COM_simple_test.cdc"/>
<binding xil_pn:location="/GECKO3COM_simple_test" xil_pn:name="GECKO3main_v1.ucf"/>
</bindings>
 
<libraries/>
/GECKO3COM/gecko3com-ip/core/GECKO3COM_simple_test.cdc
1,5 → 1,5
#ChipScope Core Inserter Project File Version 3.0
#Wed Feb 24 16:47:27 CET 2010
#Sat Feb 27 18:00:38 CET 2010
Project.device.designInputFile=/home/chrigi/bfh-work/GECKO3COM/gecko3com-ip/core/GECKO3COM_simple_test_cs.ngc
Project.device.designOutputFile=/home/chrigi/bfh-work/GECKO3COM/gecko3com-ip/core/GECKO3COM_simple_test_cs.ngc
Project.device.deviceFamily=6
106,24 → 106,24
Project.unit<0>.dataChannel<46>=GECKO3COM_simple_1 GECKO3COM_simple_fsm_1 state_FSM_FFd5
Project.unit<0>.dataChannel<47>=s_transfer_size_reg_en
Project.unit<0>.dataChannel<48>=s_send_transfersize_en
Project.unit<0>.dataChannel<49>=GECKO3COM_simple_1 GECKO3COM_simple_datapath_1 s_send_fifo_data<0>
Project.unit<0>.dataChannel<49>=GECKO3COM_simple_1 GPIF_INTERFACE s_dbus_out<0>
Project.unit<0>.dataChannel<4>=GECKO3COM_simple_1 o_receive_end_of_message
Project.unit<0>.dataChannel<50>=GECKO3COM_simple_1 GECKO3COM_simple_datapath_1 s_send_fifo_data<1>
Project.unit<0>.dataChannel<51>=GECKO3COM_simple_1 GECKO3COM_simple_datapath_1 s_send_fifo_data<2>
Project.unit<0>.dataChannel<52>=GECKO3COM_simple_1 GECKO3COM_simple_datapath_1 s_send_fifo_data<3>
Project.unit<0>.dataChannel<53>=GECKO3COM_simple_1 GECKO3COM_simple_datapath_1 s_send_fifo_data<4>
Project.unit<0>.dataChannel<54>=GECKO3COM_simple_1 GECKO3COM_simple_datapath_1 s_send_fifo_data<5>
Project.unit<0>.dataChannel<55>=GECKO3COM_simple_1 GECKO3COM_simple_datapath_1 s_send_fifo_data<6>
Project.unit<0>.dataChannel<56>=GECKO3COM_simple_1 GECKO3COM_simple_datapath_1 s_send_fifo_data<7>
Project.unit<0>.dataChannel<57>=GECKO3COM_simple_1 GECKO3COM_simple_datapath_1 s_send_fifo_data<8>
Project.unit<0>.dataChannel<58>=GECKO3COM_simple_1 GECKO3COM_simple_datapath_1 s_send_fifo_data<9>
Project.unit<0>.dataChannel<59>=GECKO3COM_simple_1 GECKO3COM_simple_datapath_1 s_send_fifo_data<10>
Project.unit<0>.dataChannel<50>=GECKO3COM_simple_1 GPIF_INTERFACE s_dbus_out<1>
Project.unit<0>.dataChannel<51>=GECKO3COM_simple_1 GPIF_INTERFACE s_dbus_out<2>
Project.unit<0>.dataChannel<52>=GECKO3COM_simple_1 GPIF_INTERFACE s_dbus_out<3>
Project.unit<0>.dataChannel<53>=GECKO3COM_simple_1 GPIF_INTERFACE s_dbus_out<4>
Project.unit<0>.dataChannel<54>=GECKO3COM_simple_1 GPIF_INTERFACE s_dbus_out<5>
Project.unit<0>.dataChannel<55>=GECKO3COM_simple_1 GPIF_INTERFACE s_dbus_out<6>
Project.unit<0>.dataChannel<56>=GECKO3COM_simple_1 GPIF_INTERFACE s_dbus_out<7>
Project.unit<0>.dataChannel<57>=GECKO3COM_simple_1 GPIF_INTERFACE s_dbus_out<8>
Project.unit<0>.dataChannel<58>=GECKO3COM_simple_1 GPIF_INTERFACE s_dbus_out<9>
Project.unit<0>.dataChannel<59>=GECKO3COM_simple_1 GPIF_INTERFACE s_dbus_out<10>
Project.unit<0>.dataChannel<5>=GECKO3COM_simple_1 o_receive_fifo_empty
Project.unit<0>.dataChannel<60>=GECKO3COM_simple_1 GECKO3COM_simple_datapath_1 s_send_fifo_data<11>
Project.unit<0>.dataChannel<61>=GECKO3COM_simple_1 GECKO3COM_simple_datapath_1 s_send_fifo_data<12>
Project.unit<0>.dataChannel<62>=GECKO3COM_simple_1 GECKO3COM_simple_datapath_1 s_send_fifo_data<13>
Project.unit<0>.dataChannel<63>=GECKO3COM_simple_1 GECKO3COM_simple_datapath_1 s_send_fifo_data<14>
Project.unit<0>.dataChannel<64>=GECKO3COM_simple_1 GECKO3COM_simple_datapath_1 s_send_fifo_data<15>
Project.unit<0>.dataChannel<60>=GECKO3COM_simple_1 GPIF_INTERFACE s_dbus_out<11>
Project.unit<0>.dataChannel<61>=GECKO3COM_simple_1 GPIF_INTERFACE s_dbus_out<12>
Project.unit<0>.dataChannel<62>=GECKO3COM_simple_1 GPIF_INTERFACE s_dbus_out<13>
Project.unit<0>.dataChannel<63>=GECKO3COM_simple_1 GPIF_INTERFACE s_dbus_out<14>
Project.unit<0>.dataChannel<64>=GECKO3COM_simple_1 GPIF_INTERFACE s_dbus_out<15>
Project.unit<0>.dataChannel<65>=GECKO3COM_simple_1 GECKO3COM_simple_datapath_1 i_rx_data<0>
Project.unit<0>.dataChannel<66>=GECKO3COM_simple_1 GECKO3COM_simple_datapath_1 i_rx_data<1>
Project.unit<0>.dataChannel<67>=GECKO3COM_simple_1 GECKO3COM_simple_datapath_1 i_rx_data<2>
/GECKO3COM/gecko3com-ip/core/GECKO3COM_simple_prng_tb.c
0,0 → 1,90
/* GECKO3COM
*
* Copyright (C) 2010 by
* ___ ____ _ _
* ( _`\ ( __)( ) ( )
* | (_) )| (_ | |_| | Bern University of Applied Sciences
* | _ <'| _) | _ | School of Engineering and
* | (_) )| | | | | | Information Technology
* (____/'(_) (_) (_)
*
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
 
/*********************************************************************/
/** \file GECKO3COM_simple_prng_tb.c
*********************************************************************
* \brief simple programm to fill a file with a desired length value
*
* to change the length of the value simply change the type of the value
* variable.
*
* \author Christoph Zimmermann bfh.ch
* \date 26. February 2010
*
*/
 
#include <stdio.h>
#include <stdint.h>
#include <stdbool.h>
#include <math.h>
 
int main (void)
{
/*--------------------------------------------------------------------------*/
/* start of user configuration values */
 
/* variable type of the desired value */
uint32_t prng_data = 0x55555555;
/* desired filename */
const char* FILENAME = "GECKO3COM_simple_prng_tb.hex";
/* how many times should the datablock repeated in the file */
int16_t loop = 4096;
 
/* end of configuration values */
/*--------------------------------------------------------------------------*/
 
FILE *output;
uint64_t i,j;
 
uint32_t prng_feedback;
 
printf("Hello, this programm will write values with a bit length of %d to the file %s\n", sizeof(prng_data)*8, FILENAME);
 
output = fopen(FILENAME, "w+b");
 
/* create the desired number of data blocks */
for(j=0; j<loop;j++) {
 
if(!fwrite(&prng_data, sizeof(prng_data), 1, output)) {
printf("ERROR writing to the file\n");
return 0;
}
 
prng_feedback = prng_data >> 10;
prng_feedback ^= prng_data >> 12;
prng_feedback ^= prng_data >> 13;
prng_feedback ^= prng_data >> 15;
 
prng_feedback &= 0x00000001;
 
prng_data = prng_data << 1;
prng_data |= prng_feedback;
}
 
fclose(output);
return 1;
}
/GECKO3COM/gecko3com-ip/core/GECKO3COM_simple_test.cpj
1,5 → 1,5
#ChipScope Pro Analyzer Project File, Version 3.0
#Wed Feb 24 00:29:25 CET 2010
#Thu Feb 25 21:47:08 CET 2010
deviceChain.deviceName0=XC3S4000
deviceChain.iRLength0=6
deviceChain.name0=MyDevice0
34,8 → 34,8
unit.0.0.1.WIDTH1=1.0563822
unit.0.0.1.X1=-0.0031323414
unit.0.0.1.Y1=0.10463734
unit.0.0.MFBitsA0=XXXX1XXXXXXX
unit.0.0.MFBitsA1=XXXXXXXXXXXX
unit.0.0.MFBitsA0=XXXXX1XXXXXX
unit.0.0.MFBitsA1=XXXXX0XXXXXX
unit.0.0.MFBitsB0=000000000000
unit.0.0.MFBitsB1=000000000000
unit.0.0.MFCompareA0=0
53,7 → 53,7
unit.0.0.TCActive=0
unit.0.0.TCAdvanced0=0
unit.0.0.TCCondition0_0=M0
unit.0.0.TCCondition0_1=M0 --> M0 --> M0 --> M0
unit.0.0.TCCondition0_1=M0
unit.0.0.TCConditionType0=1
unit.0.0.TCCount=1
unit.0.0.TCEventCount0=1
120,7 → 120,7
unit.0.0.port.-1.b.10.unsignedScaleFactor=1.0
unit.0.0.port.-1.b.10.visible=1
unit.0.0.port.-1.b.2.alias=/s_send_fifo_data
unit.0.0.port.-1.b.2.channellist=49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
unit.0.0.port.-1.b.2.channellist=49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
unit.0.0.port.-1.b.2.color=java.awt.Color[r\=0,g\=0,b\=124]
unit.0.0.port.-1.b.2.name=/s_send_fifo_data
unit.0.0.port.-1.b.2.orderindex=-1
685,7 → 685,7
unit.0.0.port.-1.s.48.visible=1
unit.0.0.port.-1.s.49.alias=
unit.0.0.port.-1.s.49.color=java.awt.Color[r\=0,g\=0,b\=124]
unit.0.0.port.-1.s.49.name=/s_send_fifo_data<0>
unit.0.0.port.-1.s.49.name=/GECKO3COM_simple_1/GECKO3COM_simple_datapath_1/s_send_fifo_data<0>
unit.0.0.port.-1.s.49.orderindex=-1
unit.0.0.port.-1.s.49.visible=0
unit.0.0.port.-1.s.5.alias=
695,52 → 695,52
unit.0.0.port.-1.s.5.visible=1
unit.0.0.port.-1.s.50.alias=
unit.0.0.port.-1.s.50.color=java.awt.Color[r\=0,g\=0,b\=124]
unit.0.0.port.-1.s.50.name=/s_send_fifo_data<1>
unit.0.0.port.-1.s.50.name=/GECKO3COM_simple_1/GECKO3COM_simple_datapath_1/s_send_fifo_data<1>
unit.0.0.port.-1.s.50.orderindex=-1
unit.0.0.port.-1.s.50.visible=0
unit.0.0.port.-1.s.51.alias=
unit.0.0.port.-1.s.51.color=java.awt.Color[r\=0,g\=0,b\=124]
unit.0.0.port.-1.s.51.name=/s_send_fifo_data<2>
unit.0.0.port.-1.s.51.name=/GECKO3COM_simple_1/GECKO3COM_simple_datapath_1/s_send_fifo_data<2>
unit.0.0.port.-1.s.51.orderindex=-1
unit.0.0.port.-1.s.51.visible=0
unit.0.0.port.-1.s.52.alias=
unit.0.0.port.-1.s.52.color=java.awt.Color[r\=0,g\=0,b\=124]
unit.0.0.port.-1.s.52.name=/s_send_fifo_data<3>
unit.0.0.port.-1.s.52.name=/GECKO3COM_simple_1/GECKO3COM_simple_datapath_1/s_send_fifo_data<3>
unit.0.0.port.-1.s.52.orderindex=-1
unit.0.0.port.-1.s.52.visible=0
unit.0.0.port.-1.s.53.alias=
unit.0.0.port.-1.s.53.color=java.awt.Color[r\=0,g\=0,b\=124]
unit.0.0.port.-1.s.53.name=/s_send_fifo_data<4>
unit.0.0.port.-1.s.53.name=/GECKO3COM_simple_1/GECKO3COM_simple_datapath_1/s_send_fifo_data<4>
unit.0.0.port.-1.s.53.orderindex=-1
unit.0.0.port.-1.s.53.visible=0
unit.0.0.port.-1.s.54.alias=
unit.0.0.port.-1.s.54.color=java.awt.Color[r\=0,g\=0,b\=124]
unit.0.0.port.-1.s.54.name=/s_send_fifo_data<5>
unit.0.0.port.-1.s.54.name=/GECKO3COM_simple_1/GECKO3COM_simple_datapath_1/s_send_fifo_data<5>
unit.0.0.port.-1.s.54.orderindex=-1
unit.0.0.port.-1.s.54.visible=0
unit.0.0.port.-1.s.55.alias=
unit.0.0.port.-1.s.55.color=java.awt.Color[r\=0,g\=0,b\=124]
unit.0.0.port.-1.s.55.name=/s_send_fifo_data<6>
unit.0.0.port.-1.s.55.name=/GECKO3COM_simple_1/GECKO3COM_simple_datapath_1/s_send_fifo_data<6>
unit.0.0.port.-1.s.55.orderindex=-1
unit.0.0.port.-1.s.55.visible=0
unit.0.0.port.-1.s.56.alias=
unit.0.0.port.-1.s.56.color=java.awt.Color[r\=0,g\=0,b\=124]
unit.0.0.port.-1.s.56.name=/s_send_fifo_data<7>
unit.0.0.port.-1.s.56.name=/GECKO3COM_simple_1/GECKO3COM_simple_datapath_1/s_send_fifo_data<7>
unit.0.0.port.-1.s.56.orderindex=-1
unit.0.0.port.-1.s.56.visible=0
unit.0.0.port.-1.s.57.alias=
unit.0.0.port.-1.s.57.color=java.awt.Color[r\=0,g\=0,b\=124]
unit.0.0.port.-1.s.57.name=/s_send_fifo_data<8>
unit.0.0.port.-1.s.57.name=/GECKO3COM_simple_1/GECKO3COM_simple_datapath_1/s_send_fifo_data<8>
unit.0.0.port.-1.s.57.orderindex=-1
unit.0.0.port.-1.s.57.visible=0
unit.0.0.port.-1.s.58.alias=
unit.0.0.port.-1.s.58.color=java.awt.Color[r\=0,g\=0,b\=124]
unit.0.0.port.-1.s.58.name=/s_send_fifo_data<9>
unit.0.0.port.-1.s.58.name=/GECKO3COM_simple_1/GECKO3COM_simple_datapath_1/s_send_fifo_data<9>
unit.0.0.port.-1.s.58.orderindex=-1
unit.0.0.port.-1.s.58.visible=0
unit.0.0.port.-1.s.59.alias=
unit.0.0.port.-1.s.59.color=java.awt.Color[r\=0,g\=0,b\=124]
unit.0.0.port.-1.s.59.name=/s_send_fifo_data<10>
unit.0.0.port.-1.s.59.name=/GECKO3COM_simple_1/GECKO3COM_simple_datapath_1/s_send_fifo_data<10>
unit.0.0.port.-1.s.59.orderindex=-1
unit.0.0.port.-1.s.59.visible=0
unit.0.0.port.-1.s.6.alias=
750,54 → 750,54
unit.0.0.port.-1.s.6.visible=1
unit.0.0.port.-1.s.60.alias=
unit.0.0.port.-1.s.60.color=java.awt.Color[r\=0,g\=0,b\=124]
unit.0.0.port.-1.s.60.name=/s_send_fifo_data<11>
unit.0.0.port.-1.s.60.name=/GECKO3COM_simple_1/GECKO3COM_simple_datapath_1/s_send_fifo_data<11>
unit.0.0.port.-1.s.60.orderindex=-1
unit.0.0.port.-1.s.60.visible=0
unit.0.0.port.-1.s.61.alias=
unit.0.0.port.-1.s.61.color=java.awt.Color[r\=0,g\=0,b\=124]
unit.0.0.port.-1.s.61.name=/s_send_fifo_data<12>
unit.0.0.port.-1.s.61.name=/GECKO3COM_simple_1/GECKO3COM_simple_datapath_1/s_send_fifo_data<12>
unit.0.0.port.-1.s.61.orderindex=-1
unit.0.0.port.-1.s.61.visible=0
unit.0.0.port.-1.s.62.alias=
unit.0.0.port.-1.s.62.color=java.awt.Color[r\=0,g\=0,b\=124]
unit.0.0.port.-1.s.62.name=/s_send_fifo_data<13>
unit.0.0.port.-1.s.62.name=/GECKO3COM_simple_1/GECKO3COM_simple_datapath_1/s_send_fifo_data<13>
unit.0.0.port.-1.s.62.orderindex=-1
unit.0.0.port.-1.s.62.visible=0
unit.0.0.port.-1.s.63.alias=
unit.0.0.port.-1.s.63.color=java.awt.Color[r\=0,g\=0,b\=124]
unit.0.0.port.-1.s.63.name=/s_send_fifo_data<14>
unit.0.0.port.-1.s.63.name=/GECKO3COM_simple_1/GECKO3COM_simple_datapath_1/s_send_fifo_data<14>
unit.0.0.port.-1.s.63.orderindex=-1
unit.0.0.port.-1.s.63.visible=0
unit.0.0.port.-1.s.64.alias=
unit.0.0.port.-1.s.64.color=java.awt.Color[r\=0,g\=0,b\=124]
unit.0.0.port.-1.s.64.name=/s_send_fifo_data<15>
unit.0.0.port.-1.s.64.name=/GECKO3COM_simple_1/GECKO3COM_simple_datapath_1/s_send_fifo_data<15>
unit.0.0.port.-1.s.64.orderindex=-1
unit.0.0.port.-1.s.64.visible=0
unit.0.0.port.-1.s.65.alias=
unit.0.0.port.-1.s.65.color=java.awt.Color[r\=0,g\=0,b\=124]
unit.0.0.port.-1.s.65.name=/s_send_fifo_data<16>
unit.0.0.port.-1.s.65.name=/GECKO3COM_simple_1/GECKO3COM_simple_datapath_1/i_rx_data<0>
unit.0.0.port.-1.s.65.orderindex=-1
unit.0.0.port.-1.s.65.visible=0
unit.0.0.port.-1.s.65.visible=1
unit.0.0.port.-1.s.66.alias=
unit.0.0.port.-1.s.66.color=java.awt.Color[r\=0,g\=0,b\=124]
unit.0.0.port.-1.s.66.name=/s_send_fifo_data<17>
unit.0.0.port.-1.s.66.name=/GECKO3COM_simple_1/GECKO3COM_simple_datapath_1/i_rx_data<1>
unit.0.0.port.-1.s.66.orderindex=-1
unit.0.0.port.-1.s.66.visible=0
unit.0.0.port.-1.s.66.visible=1
unit.0.0.port.-1.s.67.alias=
unit.0.0.port.-1.s.67.color=java.awt.Color[r\=0,g\=0,b\=124]
unit.0.0.port.-1.s.67.name=/s_send_fifo_data<18>
unit.0.0.port.-1.s.67.name=/GECKO3COM_simple_1/GECKO3COM_simple_datapath_1/i_rx_data<2>
unit.0.0.port.-1.s.67.orderindex=-1
unit.0.0.port.-1.s.67.visible=0
unit.0.0.port.-1.s.67.visible=1
unit.0.0.port.-1.s.68.alias=
unit.0.0.port.-1.s.68.color=java.awt.Color[r\=0,g\=0,b\=124]
unit.0.0.port.-1.s.68.name=/s_send_fifo_data<19>
unit.0.0.port.-1.s.68.name=/GECKO3COM_simple_1/GECKO3COM_simple_datapath_1/i_rx_data<3>
unit.0.0.port.-1.s.68.orderindex=-1
unit.0.0.port.-1.s.68.visible=0
unit.0.0.port.-1.s.68.visible=1
unit.0.0.port.-1.s.69.alias=
unit.0.0.port.-1.s.69.color=java.awt.Color[r\=0,g\=0,b\=124]
unit.0.0.port.-1.s.69.name=/s_send_fifo_data<20>
unit.0.0.port.-1.s.69.name=/GECKO3COM_simple_1/GECKO3COM_simple_datapath_1/i_rx_data<4>
unit.0.0.port.-1.s.69.orderindex=-1
unit.0.0.port.-1.s.69.visible=0
unit.0.0.port.-1.s.69.visible=1
unit.0.0.port.-1.s.7.alias=
unit.0.0.port.-1.s.7.color=java.awt.Color[r\=0,g\=0,b\=124]
unit.0.0.port.-1.s.7.name=/GECKO3COM_simple_1/o_send_data_request
805,19 → 805,19
unit.0.0.port.-1.s.7.visible=1
unit.0.0.port.-1.s.70.alias=
unit.0.0.port.-1.s.70.color=java.awt.Color[r\=0,g\=0,b\=124]
unit.0.0.port.-1.s.70.name=/s_send_fifo_data<21>
unit.0.0.port.-1.s.70.name=/GECKO3COM_simple_1/GECKO3COM_simple_datapath_1/i_rx_data<5>
unit.0.0.port.-1.s.70.orderindex=-1
unit.0.0.port.-1.s.70.visible=0
unit.0.0.port.-1.s.70.visible=1
unit.0.0.port.-1.s.71.alias=
unit.0.0.port.-1.s.71.color=java.awt.Color[r\=0,g\=0,b\=124]
unit.0.0.port.-1.s.71.name=/s_send_fifo_data<22>
unit.0.0.port.-1.s.71.name=/GECKO3COM_simple_1/GECKO3COM_simple_datapath_1/i_rx_data<6>
unit.0.0.port.-1.s.71.orderindex=-1
unit.0.0.port.-1.s.71.visible=0
unit.0.0.port.-1.s.71.visible=1
unit.0.0.port.-1.s.72.alias=
unit.0.0.port.-1.s.72.color=java.awt.Color[r\=0,g\=0,b\=124]
unit.0.0.port.-1.s.72.name=/s_send_fifo_data<23>
unit.0.0.port.-1.s.72.name=/GECKO3COM_simple_1/GECKO3COM_simple_datapath_1/i_rx_data<7>
unit.0.0.port.-1.s.72.orderindex=-1
unit.0.0.port.-1.s.72.visible=0
unit.0.0.port.-1.s.72.visible=1
unit.0.0.port.-1.s.73.alias=
unit.0.0.port.-1.s.73.color=java.awt.Color[r\=0,g\=0,b\=124]
unit.0.0.port.-1.s.73.name=/s_send_have_more_data
1015,7 → 1015,7
unit.0.0.port.0.s.4.visible=1
unit.0.0.port.0.s.5.alias=
unit.0.0.port.0.s.5.color=java.awt.Color[r\=0,g\=0,b\=124]
unit.0.0.port.0.s.5.name=/GECKO3COM_simple_1/s_gpif_abort
unit.0.0.port.0.s.5.name=/i_RDYU_IBUF
unit.0.0.port.0.s.5.orderindex=-1
unit.0.0.port.0.s.5.visible=1
unit.0.0.port.0.s.6.alias=
/GECKO3COM/gecko3com-ip/core/gpif_com.vhd
78,13 → 78,12
architecture structure of gpif_com is
-- interconection signals
signal s_FIFOrst, s_WRX, s_RDYX : std_logic;
 
signal s_FIFOrst, s_WRX, s_RDYX : std_logic;
signal s_ABORT_FSM, s_ABORT_TMP : std_logic;
signal s_RX_FSM, s_RX_TMP : std_logic;
signal s_TX_FSM, s_TX_TMP : std_logic;
signal s_EOM, s_EOM_TMP, s_EOM_FF : std_logic; -- End of message
signal s_ABORT_FSM, s_ABORT_TMP : std_logic;
signal s_RX_FSM, s_RX_TMP : std_logic;
signal s_TX_FSM, s_TX_TMP : std_logic;
signal s_EOM, s_EOM_TMP, s_EOM_FF : std_logic; -- End of message
signal s_X2U_FULL_IFCLK, s_X2U_FULL_TMP : std_logic;
-- USB to Xilinx (U2X)
93,8 → 92,8
s_U2X_FULL,
s_U2X_AM_FULL,
s_U2X_EMPTY,
s_U2X_AM_EMPTY : std_logic;
signal s_U2X_DATA : std_logic_vector(SIZE_DBUS_GPIF-1 downto 0);
s_U2X_AM_EMPTY : std_logic;
signal s_U2X_DATA : std_logic_vector(SIZE_DBUS_GPIF-1 downto 0);
-- Xilinx to USB (X2U)
signal s_X2U_WR_EN,
102,8 → 101,8
s_X2U_FULL,
s_X2U_AM_FULL,
s_X2U_EMPTY,
s_X2U_AM_EMPTY : std_logic;
signal s_X2U_DATA : std_logic_vector(SIZE_DBUS_GPIF-1 downto 0);
s_X2U_AM_EMPTY : std_logic;
signal s_X2U_DATA : std_logic_vector(SIZE_DBUS_GPIF-1 downto 0);
-----------------------------------------------------------------------------
-- data bus
110,9 → 109,10
-----------------------------------------------------------------------------
 
-- data signals
signal s_dbus_trans_dir : std_logic;
signal s_dbus_in : std_logic_vector(SIZE_DBUS_GPIF-1 downto 0);
signal s_dbus_out : std_logic_vector(SIZE_DBUS_GPIF-1 downto 0);
signal s_dbus_trans_dir : std_logic;
signal s_dbus_in : std_logic_vector(SIZE_DBUS_GPIF-1 downto 0);
signal s_dbus_out : std_logic_vector(SIZE_DBUS_GPIF-1 downto 0);
signal s_dbus_out_fifo : std_logic_vector(SIZE_DBUS_GPIF-1 downto 0);
-----------------------------------------------------------------------------
-- COMPONENTS
191,7 → 191,7
i_wr_en => s_X2U_WR_EN,
o_almost_empty => s_X2U_AM_EMPTY,
o_almost_full => s_X2U_AM_FULL,
o_dout => s_dbus_out,
o_dout => s_dbus_out_fifo,
o_empty => s_X2U_EMPTY,
o_full => s_X2U_FULL
);
309,6 → 309,10
begin
if rising_edge(i_IFCLK) then
s_dbus_in <= b_gpif_bus;
 
if s_X2U_RD_EN = '1' then
s_dbus_out <= s_dbus_out_fifo;
end if;
end if;
end process buf_input;
/GECKO3COM/gecko3com-ip/core/GECKO3COM_simple_prng_tb.vhd
0,0 → 1,159
-- GECKO3COM IP Core
--
-- Copyright (C) 2009 by
-- ___ ___ _ _
-- ( _ \ ( __)( ) ( )
-- | (_) )| ( | |_| | Bern University of Applied Sciences
-- | _ < | _) | _ | School of Engineering and
-- | (_) )| | | | | | Information Technology
-- (____/ (_) (_) (_)
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- URL to the project description:
-- http://labs.ti.bfh.ch/gecko/wiki/systems/gecko3com/start
--------------------------------------------------------------------------------
--
-- Author: Christoph Zimmermann
-- Date of creation: 26. February 2010
-- Description:
-- Small testbench to simulate the pseudo random number generator used in
-- the GECKO3COM_simple_test module.
--
-- The file output is not usable for our case. To compare the data we
-- receive through USB we use the output from GECKO3COM_simple_prng_tb.c
--
-- Tool versions: 11.1
-- Dependencies:
--
--------------------------------------------------------------------------------
 
 
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
 
library std;
use std.textio.all;
 
 
entity GECKO3COM_simple_prng_tb is
end GECKO3COM_simple_prng_tb;
 
architecture simulation of GECKO3COM_simple_prng_tb is
 
-- simulation constants
constant C_SIM_DURATION : time := 80080 ns; -- duration of simulation
constant CLK_PERIOD : time := 20 ns;
 
-- signals
signal sim_stoped : boolean := false;
signal sim_clk : std_logic;
signal sim_rst : std_logic;
signal s_prng_en : std_logic;
signal s_prng_feedback : std_logic;
signal s_prng_data : std_logic_vector(31 downto 0);
 
 
begin -- simulation
 
sim_stoped <= true after C_SIM_DURATION;
 
-----------------------------------------------------------------------------
-- Design maps
-----------------------------------------------------------------------------
 
sim_prng_en : process (sim_clk, sim_rst)
begin
if sim_rst = '0' then -- asynchronous reset (active low)
s_prng_en <= '0';
elsif sim_clk'event and sim_clk = '1' then -- rising clock edge
s_prng_en <= '1';
end if;
end process sim_prng_en;
 
 
-- purpose: linear shift register for the pseude random number
-- generator (PRNG)
-- type : sequential
-- inputs : i_sysclk, i_nReset, s_prng_en, s_prng_feedback
-- outputs: s_prng_data
prng_shiftregister : process (sim_clk, sim_rst)
begin -- process prng_shiftregister
if sim_rst = '0' then -- asynchronous reset (active low)
s_prng_data <= "01010101010101010101010101010101";
elsif sim_clk'event and sim_clk = '1' then -- rising clock edge
if s_prng_en = '1' then
s_prng_data(31 downto 1) <= s_prng_data(30 downto 0);
s_prng_data(0) <= s_prng_feedback;
end if;
end if;
end process prng_shiftregister;
 
-- purpose: feedback polynom for the pseudo random number generator (PRNG)
-- inputs : s_prng_data
-- outputs: s_prng_feedback
s_prng_feedback <= s_prng_data(15) xor s_prng_data(13) xor s_prng_data(12)
xor s_prng_data(10);
 
 
 
-----------------------------------------------------------------------------
-- CLK process
-----------------------------------------------------------------------------
clk_process : process
begin
sim_clk <= '0';
wait for CLK_PERIOD/2;
sim_clk <= '1';
wait for CLK_PERIOD/2;
if sim_stoped then
wait;
end if;
end process;
 
rst_process : process
begin
sim_rst <= '0';
wait for 2*CLK_PERIOD;
sim_rst <= '1';
wait;
end process;
 
-----------------------------------------------------------------------------
-- write file process
-----------------------------------------------------------------------------
 
write_input : process
type bin_file is file of bit_vector(31 downto 0);
file c_file_handle : bin_file;
--type char_file is file of character;
--file c_file_handle : char_file;
variable C : character := 'W';
variable char_count : integer := 0;
begin
file_open(c_file_handle, "GECKO3COM_simple_prng_tb.txt", write_mode);
 
while sim_stoped = false loop
write(c_file_handle, to_bitvector(s_prng_data));
--write(c_file_handle, C);
char_count := char_count + 1;
wait until sim_clk = '1';
end loop;
file_close(c_file_handle);
end process;
 
end simulation;
/GECKO3COM/gecko3com-fw/firmware/include/gecko3com_gpif.h
78,7 → 78,7
GPIFTCB2 = 0x00; \
GPIFTCB1 = 0x00; \
GPIFTCB0 = 0x01; \
GPIFTRIG = bmGPIF_EP6_START | bmGPIF_READ; /* trigger FIFO out transfer */ \
GPIFTRIG = bmGPIF_EP6_START | bmGPIF_READ; /* trigger FIFO IN transfer */ \
/*SYNCDELAY;*/ \
} while (0)
 
94,7 → 94,7
GPIFTCB2 = 0x00; \
GPIFTCB1 = 0x00; \
GPIFTCB0 = 0x01; \
GPIFTRIG = bmGPIF_EP2_START | bmGPIF_WRITE; /* trigger FIFO out transfer */ \
GPIFTRIG = bmGPIF_EP2_START | bmGPIF_WRITE; /* trigger FIFO OUT transfer*/ \
/*SYNCDELAY;*/ \
} while(0)
 
/GECKO3COM/gecko3com-fw/firmware/src/gecko3com_gpif.c
169,13 → 169,16
IFCONFIG = bmIFCLKSRC | bmIFCLKOE | bmGSTATE | bmIFGPIF;
SYNCDELAY;
 
/* we have to commit the currently processed packet BEFORE we switch to auto out mode */
/* we have to commit the currently processed packet BEFORE we switch
*to auto out mode */
OUTPKTEND = bmSKIP | USB_TMC_EP_OUT;
 
/*FIXME only here for testing */
//EP6AUTOINLENH = (20) >> 8; SYNCDELAY; /* this is the length for high speed */
//EP6AUTOINLENL = (20) & 0xff; SYNCDELAY;
/* reset FIFOs */
 
FIFORESET = bmNAKALL; SYNCDELAY;
FIFORESET = 6; SYNCDELAY;
FIFORESET = 0; SYNCDELAY;
 
/* enable autoout and autoin feature of the endpoints */
EP2FIFOCFG |= bmAUTOOUT;
SYNCDELAY;
194,6 → 197,12
EP2GPIFFLGSEL = bmFLAG_PROGRAMMABLE;
//EP2GPIFFLGSEL = bmFLAG_EMPTY;
SYNCDELAY;
 
//EP6FIFOPFH = bmDECIS | 0x19;
//EP6FIFOPFL = 0xFB;
//SYNCDELAY;
 
//EP6GPIFFLGSEL = bmFLAG_PROGRAMMABLE;
EP6GPIFFLGSEL = bmFLAG_FULL;
SYNCDELAY;
 
211,7 → 220,8
GPIFIDLECTL = InitData[ 3 ];
/* Hmmm, what's InitData[ 4 ] ... */
GPIFWFSELECT = InitData[ 5 ];
/* GPIFREADYSTAT = InitData[ 6 ]; */ /* I think this register is read only... */
/* I think this register is read only... */
/* GPIFREADYSTAT = InitData[ 6 ]; */
for (i = 0; i < 128; i++){
GPIF_WAVE_DATA[i] = WaveData[i];
/GECKO3COM/gecko3com-fw/firmware/src/gecko3com_common.c
117,8 → 117,8
 
/* set autoout length for EP2 and autoin length for EP6 */
if(USBCS & bmHSM){
EP6AUTOINLENH = (512) >> 8; SYNCDELAY; /* this is the length for high speed */
EP6AUTOINLENL = (512) & 0xff; SYNCDELAY;
EP6AUTOINLENH = (512) >> 8; SYNCDELAY; /* this is the length for */
EP6AUTOINLENL = (512) & 0xff; SYNCDELAY; /* high speed */
}
else {
EP6AUTOINLENH = 0; SYNCDELAY; /* this is the length for full speed */
182,9 → 182,9
init_io_ext (void)
{
xdata uint8_t cmd[2];
cmd[0] = 0x03; /* write to configuration register */
cmd[1] = 0x01; /* set Bit 0 (LSB) as input and Bit 1,2 as output, others be irrelevant */
i2c_write(I2C_DEV_IO, cmd, 2);
cmd[0] = 0x03; /* write to configuration register */
cmd[1] = 0x01; /* set Bit 0 (LSB) as input and Bit */
i2c_write(I2C_DEV_IO, cmd, 2); /* 1,2 as output, others be irrelevant */
}
 
void
191,8 → 191,8
set_led_ext (const uint8_t color)
{
xdata uint8_t cmd[2];
cmd[0] = 0x01; /* write to output port register */
cmd[1] = color; /* set LED */
cmd[0] = 0x01; /* write to output port register */
cmd[1] = color; /* set LED */
i2c_write(I2C_DEV_IO, cmd, 2);
flLED = ~LEDS_OFF;
}
202,13 → 202,13
{
xdata uint8_t cmd[1];
cmd[0] = 0x00; /* set command byte to input port register */
cmd[0] = 0x00; /* set command byte to input port register */
 
i2c_write(I2C_DEV_IO, cmd, 1);
i2c_read(I2C_DEV_IO, cmd, 1);
if((cmd[0] & 0x01) == 1){ /* only bit 0 in the input register is used */
if((cmd[0] & 0x01) == 1){ /* only bit 0 in the input register is used */
return 1;
}
/GECKO3COM/gecko3com-fw/gecko3com.iic Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream

powered by: WebSVN 2.1.0

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