Git Product home page Git Product logo

connectal's People

Contributors

acw1251 avatar chamdoo avatar chenm001 avatar cyanokobalamyne avatar gtwhy avatar hanw avatar hirayaku avatar jameyhicks avatar jankcorn avatar jrtc27 avatar kovirobi avatar kurocatus avatar lstewart avatar m-liu avatar mirv123 avatar myronking avatar pwang7 avatar sizhuo-zhang avatar threonorm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

connectal's Issues

'memcpy' example: program does not end

Hey Jamey,
I was exploring different platforms where we can share memory between an FPGA and a processor, and I think Connectal would be very useful tool for it.

I tried to run your 'memcpy' example, in which a source memory is initialized in software and hardware copies it to destination location. But it looks like program does not finish after the memory allocation. It would be very helpful if you suggest any necessary changes.

Thanks!

Regards,
Prasanna

Issues with defined macros in bsvpreprocessor.py

Right now, the following is not supported in connectal/scripts/bsvpreprocess.py (code from lib/BSVSource/Contexts/Contexts.defines within the Bluespec installation directory):

`define SynthBoundary(mkM,IM) \
(*synthesize*)\
module [Module] mkM``V(Tuple2#(completeContextIfc,IM))\
  provisos(Expose#(CompleteContext,completeContextIfc,_n));\
  (*hide*)\
  let _init<-mkInitialCompleteContext;\
  (*hide*)\
  let _ifc <- unbury(_init,mkM``0);\
  return _ifc;\
endmodule\
module [ModuleContext#(CompleteContext)] mkM(IM);\
  (*hide*)\
  let _ifc<-rebury(mkM``V);\
  return _ifc;\
endmodule

The current error produced by bsvpreprocessor.py is that there is an unhandled preprocessor token on line 3 (but that `` is just for concatenation after substitution).

I took a look at the code, and it looks like it doesn't support macros with arguments. In addition to that, it looks like it is only taking the next token after the macro as its definition, but I believe that it should take the rest of the line as the definition.

Errors while compiling nvme_test

Hi,

the following error appears while compiling nvme_test with command "make build.nfsume":

Error: "/home/netfpga/gitHub/connectal/lib/nvme/bsv/Nvme.bsv", line 166, column 62: (T0080)
Type error at the use of the following function:
toGet

The expected return type of the function:
Clock

The return type according to the use:
GetPut::Get#(b__)

obj/Makefile:38: recipe for target 'obj/Nvme.bo' failed
make[1]: *** [obj/Nvme.bo] Error 1
make[1]: *** Waiting for unfinished jobs....

bsvpreprocess.py hits AssertionError if backticks used in block comment

I've started auto-generating documentation by parsing bsv files, and one of my conventions is causing bsvpreprocess.py to hit an AssertionError when preprocessing some files.

The issue comes from having backticks (`) in comment blocks (/* ... */) like this: https://github.com/csail-csg/recycle-bsv-lib/blob/master/src/bsv/PrintTrace.bsv#L36

(In case you are curious, the generated documentation for this file is here: https://github.com/csail-csg/recycle-bsv-lib/blob/master/doc/markdown/PrintTrace.md)

I think this can be fixed by either completely ignoring comment blocks (maybe around here: https://github.com/cambridgehackers/connectal/blob/master/scripts/bsvpreprocess.py#L55) or by adding block comments to the comment variable instead of the noncomment variable.

pcieportal.c compile issue with Linux kernel 4.10

I get the following error when compiling connectal on Ubuntu 16.04 LTS (kernel 4.10.0-28-generic (x86_64)):

dmitry@ubuntu:~/projects/connectal$ make all && sudo make install
(cd drivers/pcieportal; make)
make[1]: Entering directory '/home/dmitry/projects/connectal/drivers/pcieportal'
md5sum *.c ../../generated/cpp/*.c | grep -v mod.c | sed -f ../../scripts/driver_signature.sed >pcieportal_signature_file.h
make[2]: Entering directory '/usr/src/linux-headers-4.10.0-28-generic'
  CC [M]  /home/dmitry/projects/connectal/drivers/pcieportal/pcieportal.o
/home/dmitry/projects/connectal/drivers/pcieportal/pcieportal.c:725:8: error: type defaults to ‘int’ in declaration of ‘DEFINE_PCI_DEVICE_TABLE’ [-Werror=implicit-int]
 static DEFINE_PCI_DEVICE_TABLE(pcieportal_id_table) = {{
        ^
/home/dmitry/projects/connectal/drivers/pcieportal/pcieportal.c:725:1: warning: parameter names (without types) in function declaration
 static DEFINE_PCI_DEVICE_TABLE(pcieportal_id_table) = {{
 ^
/home/dmitry/projects/connectal/drivers/pcieportal/pcieportal.c:725:1: error: function ‘DEFINE_PCI_DEVICE_TABLE’ is initialized like a variable
/home/dmitry/projects/connectal/drivers/pcieportal/pcieportal.c:725:1: warning: braces around scalar initializer
/home/dmitry/projects/connectal/drivers/pcieportal/pcieportal.c:725:1: note: (near initialization for ‘DEFINE_PCI_DEVICE_TABLE’)
In file included from /home/dmitry/projects/connectal/drivers/pcieportal/pcieportal.c:28:0:
./include/linux/pci.h:725:2: error: field name not in record or union initializer
  .vendor = (vend), .device = (dev), \
  ^
/home/dmitry/projects/connectal/drivers/pcieportal/pcieportal.c:726:9: note: in expansion of macro ‘PCI_DEVICE’
         PCI_DEVICE(BLUESPEC_VENDOR_ID, CONNECTAL_DEVICE_ID)}, { /* end: all zer
         ^
./include/linux/pci.h:725:2: note: (near initialization for ‘DEFINE_PCI_DEVICE_TABLE’)
  .vendor = (vend), .device = (dev), \
  ^
/home/dmitry/projects/connectal/drivers/pcieportal/pcieportal.c:726:9: note: in expansion of macro ‘PCI_DEVICE’
         PCI_DEVICE(BLUESPEC_VENDOR_ID, CONNECTAL_DEVICE_ID)}, { /* end: all zer
         ^
./include/linux/pci.h:725:12: error: invalid initializer
  .vendor = (vend), .device = (dev), \
            ^
/home/dmitry/projects/connectal/drivers/pcieportal/pcieportal.c:726:9: note: in expansion of macro ‘PCI_DEVICE’
         PCI_DEVICE(BLUESPEC_VENDOR_ID, CONNECTAL_DEVICE_ID)}, { /* end: all zer
         ^
./include/linux/pci.h:725:12: note: (near initialization for ‘DEFINE_PCI_DEVICE_TABLE’)
  .vendor = (vend), .device = (dev), \
            ^
/home/dmitry/projects/connectal/drivers/pcieportal/pcieportal.c:726:9: note: in expansion of macro ‘PCI_DEVICE’
         PCI_DEVICE(BLUESPEC_VENDOR_ID, CONNECTAL_DEVICE_ID)}, { /* end: all zer
         ^
./include/linux/pci.h:725:20: error: field name not in record or union initializer
  .vendor = (vend), .device = (dev), \
                    ^
/home/dmitry/projects/connectal/drivers/pcieportal/pcieportal.c:726:9: note: in expansion of macro ‘PCI_DEVICE’
         PCI_DEVICE(BLUESPEC_VENDOR_ID, CONNECTAL_DEVICE_ID)}, { /* end: all zer
         ^
./include/linux/pci.h:725:20: note: (near initialization for ‘DEFINE_PCI_DEVICE_TABLE’)
  .vendor = (vend), .device = (dev), \
                    ^
/home/dmitry/projects/connectal/drivers/pcieportal/pcieportal.c:726:9: note: in expansion of macro ‘PCI_DEVICE’
         PCI_DEVICE(BLUESPEC_VENDOR_ID, CONNECTAL_DEVICE_ID)}, { /* end: all zer
         ^
./include/linux/pci.h:725:30: warning: excess elements in scalar initializer
  .vendor = (vend), .device = (dev), \
                              ^
/home/dmitry/projects/connectal/drivers/pcieportal/pcieportal.c:726:9: note: in expansion of macro ‘PCI_DEVICE’
         PCI_DEVICE(BLUESPEC_VENDOR_ID, CONNECTAL_DEVICE_ID)}, { /* end: all zer
         ^
./include/linux/pci.h:725:30: note: (near initialization for ‘DEFINE_PCI_DEVICE_TABLE’)
  .vendor = (vend), .device = (dev), \
                              ^
/home/dmitry/projects/connectal/drivers/pcieportal/pcieportal.c:726:9: note: in expansion of macro ‘PCI_DEVICE’
         PCI_DEVICE(BLUESPEC_VENDOR_ID, CONNECTAL_DEVICE_ID)}, { /* end: all zer
         ^
./include/linux/pci.h:726:2: error: field name not in record or union initializer
  .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID
  ^
/home/dmitry/projects/connectal/drivers/pcieportal/pcieportal.c:726:9: note: in expansion of macro ‘PCI_DEVICE’
         PCI_DEVICE(BLUESPEC_VENDOR_ID, CONNECTAL_DEVICE_ID)}, { /* end: all zer
         ^
./include/linux/pci.h:726:2: note: (near initialization for ‘DEFINE_PCI_DEVICE_TABLE’)
  .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID
  ^
/home/dmitry/projects/connectal/drivers/pcieportal/pcieportal.c:726:9: note: in expansion of macro ‘PCI_DEVICE’
         PCI_DEVICE(BLUESPEC_VENDOR_ID, CONNECTAL_DEVICE_ID)}, { /* end: all zer
         ^
In file included from ./include/linux/pci.h:20:0,
                 from /home/dmitry/projects/connectal/drivers/pcieportal/pcieportal.c:28:
./include/linux/mod_devicetable.h:16:20: warning: excess elements in scalar initializer
 #define PCI_ANY_ID (~0)
                    ^
./include/linux/pci.h:726:15: note: in expansion of macro ‘PCI_ANY_ID’
  .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID
               ^
/home/dmitry/projects/connectal/drivers/pcieportal/pcieportal.c:726:9: note: in expansion of macro ‘PCI_DEVICE’
         PCI_DEVICE(BLUESPEC_VENDOR_ID, CONNECTAL_DEVICE_ID)}, { /* end: all zer
         ^
./include/linux/mod_devicetable.h:16:20: note: (near initialization for ‘DEFINE_PCI_DEVICE_TABLE’)
 #define PCI_ANY_ID (~0)
                    ^
./include/linux/pci.h:726:15: note: in expansion of macro ‘PCI_ANY_ID’
  .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID
               ^
/home/dmitry/projects/connectal/drivers/pcieportal/pcieportal.c:726:9: note: in expansion of macro ‘PCI_DEVICE’
         PCI_DEVICE(BLUESPEC_VENDOR_ID, CONNECTAL_DEVICE_ID)}, { /* end: all zer
         ^
In file included from /home/dmitry/projects/connectal/drivers/pcieportal/pcieportal.c:28:0:
./include/linux/pci.h:726:27: error: field name not in record or union initializer
  .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID
                           ^
/home/dmitry/projects/connectal/drivers/pcieportal/pcieportal.c:726:9: note: in expansion of macro ‘PCI_DEVICE’
         PCI_DEVICE(BLUESPEC_VENDOR_ID, CONNECTAL_DEVICE_ID)}, { /* end: all zer
         ^
./include/linux/pci.h:726:27: note: (near initialization for ‘DEFINE_PCI_DEVICE_TABLE’)
  .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID
                           ^
/home/dmitry/projects/connectal/drivers/pcieportal/pcieportal.c:726:9: note: in expansion of macro ‘PCI_DEVICE’
         PCI_DEVICE(BLUESPEC_VENDOR_ID, CONNECTAL_DEVICE_ID)}, { /* end: all zer
         ^
In file included from ./include/linux/pci.h:20:0,
                 from /home/dmitry/projects/connectal/drivers/pcieportal/pcieportal.c:28:
./include/linux/mod_devicetable.h:16:20: warning: excess elements in scalar initializer
 #define PCI_ANY_ID (~0)
                    ^
./include/linux/pci.h:726:40: note: in expansion of macro ‘PCI_ANY_ID’
  .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID
                                        ^
/home/dmitry/projects/connectal/drivers/pcieportal/pcieportal.c:726:9: note: in expansion of macro ‘PCI_DEVICE’
         PCI_DEVICE(BLUESPEC_VENDOR_ID, CONNECTAL_DEVICE_ID)}, { /* end: all zer
         ^
./include/linux/mod_devicetable.h:16:20: note: (near initialization for ‘DEFINE_PCI_DEVICE_TABLE’)
 #define PCI_ANY_ID (~0)
                    ^
./include/linux/pci.h:726:40: note: in expansion of macro ‘PCI_ANY_ID’
  .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID
                                        ^
/home/dmitry/projects/connectal/drivers/pcieportal/pcieportal.c:726:9: note: in expansion of macro ‘PCI_DEVICE’
         PCI_DEVICE(BLUESPEC_VENDOR_ID, CONNECTAL_DEVICE_ID)}, { /* end: all zer
         ^
/home/dmitry/projects/connectal/drivers/pcieportal/pcieportal.c:726:9: warning: braces around scalar initializer
/home/dmitry/projects/connectal/drivers/pcieportal/pcieportal.c:726:9: note: (near initialization for ‘DEFINE_PCI_DEVICE_TABLE’)
/home/dmitry/projects/connectal/drivers/pcieportal/pcieportal.c:726:63: warning: excess elements in scalar initializer
         PCI_DEVICE(BLUESPEC_VENDOR_ID, CONNECTAL_DEVICE_ID)}, { /* end: all zer
                                                               ^
/home/dmitry/projects/connectal/drivers/pcieportal/pcieportal.c:726:63: note: (near initialization for ‘DEFINE_PCI_DEVICE_TABLE’)
In file included from /home/dmitry/projects/connectal/drivers/pcieportal/pcieportal.c:26:0:
/home/dmitry/projects/connectal/drivers/pcieportal/pcieportal.c:728:26: error: ‘pcieportal_id_table’ undeclared here (not in a function)
 MODULE_DEVICE_TABLE(pci, pcieportal_id_table);
                          ^
./include/linux/module.h:213:21: note: in definition of macro ‘MODULE_DEVICE_TABLE’
 extern const typeof(name) __mod_##type##__##name##_device_table  \
                     ^
/home/dmitry/projects/connectal/drivers/pcieportal/pcieportal.c: In function ‘pcieportal_init’:
<command-line>:0:16: error: implicit declaration of function ‘KBUILD_STR’ [-Werror=implicit-function-declaration]
/home/dmitry/projects/connectal/drivers/pcieportal/pcieportal.c:809:87: note: in expansion of macro ‘DRIVER_VERSION’
 N_INFO "%s: Registered Connectal Pcieportal driver %s\n", DEV_NAME, DRIVER_VERS
                                                                     ^
<command-line>:0:27: error: too many decimal points in number
/home/dmitry/projects/connectal/drivers/pcieportal/pcieportal.c:809:87: note: in expansion of macro ‘DRIVER_VERSION’
 N_INFO "%s: Registered Connectal Pcieportal driver %s\n", DEV_NAME, DRIVER_VERS
                                                                     ^
/home/dmitry/projects/connectal/drivers/pcieportal/pcieportal.c: In function ‘pcieportal_exit’:
<command-line>:0:27: error: too many decimal points in number
/home/dmitry/projects/connectal/drivers/pcieportal/pcieportal.c:833:89: note: in expansion of macro ‘DRIVER_VERSION’
 INFO "%s: Unregistered Connectal Pcieportal driver %s\n", DEV_NAME, DRIVER_VERS
                                                                     ^
In file included from ./include/linux/module.h:18:0,
                 from /home/dmitry/projects/connectal/drivers/pcieportal/pcieportal.c:26:
/home/dmitry/projects/connectal/drivers/pcieportal/pcieportal.c: At top level:
<command-line>:0:16: error: expected ‘,’ or ‘;’ before ‘KBUILD_STR’
./include/linux/moduleparam.h:23:26: note: in definition of macro ‘__MODULE_INFO’
   = __stringify(tag) "=" info
                          ^
./include/linux/module.h:237:34: note: in expansion of macro ‘MODULE_INFO’
 #define MODULE_VERSION(_version) MODULE_INFO(version, _version)
                                  ^
/home/dmitry/projects/connectal/drivers/pcieportal/pcieportal.c:849:1: note: in expansion of macro ‘MODULE_VERSION’
 MODULE_VERSION(DRIVER_VERSION);
 ^
/home/dmitry/projects/connectal/drivers/pcieportal/pcieportal.c:849:16: note: in expansion of macro ‘DRIVER_VERSION’
 MODULE_VERSION(DRIVER_VERSION);
                ^
<command-line>:0:27: error: too many decimal points in number
./include/linux/moduleparam.h:23:26: note: in definition of macro ‘__MODULE_INFO’
   = __stringify(tag) "=" info
                          ^
./include/linux/module.h:237:34: note: in expansion of macro ‘MODULE_INFO’
 #define MODULE_VERSION(_version) MODULE_INFO(version, _version)
                                  ^
/home/dmitry/projects/connectal/drivers/pcieportal/pcieportal.c:849:1: note: in expansion of macro ‘MODULE_VERSION’
 MODULE_VERSION(DRIVER_VERSION);
 ^
/home/dmitry/projects/connectal/drivers/pcieportal/pcieportal.c:849:16: note: in expansion of macro ‘DRIVER_VERSION’
 MODULE_VERSION(DRIVER_VERSION);
                ^
/home/dmitry/projects/connectal/drivers/pcieportal/pcieportal.c:725:8: warning: ‘DEFINE_PCI_DEVICE_TABLE’ defined but not used [-Wunused-function]
 static DEFINE_PCI_DEVICE_TABLE(pcieportal_id_table) = {{
        ^
In file included from /home/dmitry/projects/connectal/drivers/pcieportal/pcieportal.c:26:0:
./include/linux/module.h:213:27: error: ‘__mod_pci__pcieportal_id_table_device_table’ aliased to undefined symbol ‘pcieportal_id_table’
 extern const typeof(name) __mod_##type##__##name##_device_table  \
                           ^
/home/dmitry/projects/connectal/drivers/pcieportal/pcieportal.c:728:1: note: in expansion of macro ‘MODULE_DEVICE_TABLE’
 MODULE_DEVICE_TABLE(pci, pcieportal_id_table);
 ^
cc1: some warnings being treated as errors
scripts/Makefile.build:301: recipe for target '/home/dmitry/projects/connectal/drivers/pcieportal/pcieportal.o' failed
make[3]: *** [/home/dmitry/projects/connectal/drivers/pcieportal/pcieportal.o] Error 1
Makefile:1524: recipe for target '_module_/home/dmitry/projects/connectal/drivers/pcieportal' failed
make[2]: *** [_module_/home/dmitry/projects/connectal/drivers/pcieportal] Error 2
make[2]: Leaving directory '/usr/src/linux-headers-4.10.0-28-generic'
Makefile:38: recipe for target 'pcieportal.ko' failed
make[1]: *** [pcieportal.ko] Error 2
make[1]: Leaving directory '/home/dmitry/projects/connectal/drivers/pcieportal'
Makefile:32: recipe for target 'pciedrivers' failed
make: *** [pciedrivers] Error 2

AUTOTOP mkBluenocTop

The xsim target works with mkBluenocTop instead of mkConnectalTop so that it does not have to simulate individual memory reads/writes for portal messages.

Parser for includes.

Depending on how we comment an include :

//`include foo
// `include bar

the script for dependency tracking consider that foo is a dependency, but not bar. When I expect the two to not be dependencies (as they are commented).

I guess connectal used the first form of comment as a feature to signal weird dependies invisible to bluespec but visible to connectal?

The code involved is in bsvdependencies.py:

 m = re.match('//`include "([^\"]+)"', line)
 m1 = re.match('//`include(.*)', line)
 if m:
                iname = m.group(1)
                if iname in abspaths:
                    iname = abspaths[iname]
                else:
                    iname = 'obj/%s' % iname
                includes.append(iname)

I am not sure why this special case. I don't have the full picture.
If connectal really need to do this kind of commented include that should not be seen by BSV, perhaps connectal could use a special form of include like `includeConnectal, that would be in the comment section?

DMA burst size limited to 32

In example tests/memread_manual, variable burstLen has no effect on the length of DMA transaction burst len.

I added the follow lines to Rtest.bsv

  • 61 rule cyc;
  • 62 cycle <= cycle + 1;
  • 63 endrule
    70 rule check;
    71 let v <- toGet(re.dataPipes[0]).get;
    72 let expectedV = {srcGens+1,srcGens};
    73 let misMatch = v != expectedV;
    74 mismatchCounts <= mismatchCounts + (misMatch ? 1 : 0);
    75 let new_srcGens = srcGens+2;
    76 if (new_srcGens >= truncate(chunk/4))
    77 >....... new_srcGens = 0;
    78 srcGens <= new_srcGens;
  • 79 $display("%d: check data %h", cycle, v);
    80 endrule

Example Log:
67940: check data 0000000100000000
67941: check data 0000000300000002
67942: check data 0000000500000004
67943: check data 0000000700000006
67944: check data 0000000900000008
67945: check data 0000000b0000000a
67946: check data 0000000d0000000c
67947: check data 0000000f0000000e
67948: check data 0000001100000010
67949: check data 0000001300000012
67950: check data 0000001500000014
67951: check data 0000001700000016
67952: check data 0000001900000018
67953: check data 0000001b0000001a
67954: check data 0000001d0000001c
67955: check data 0000001f0000001e
67956: check data 0000002100000020
67957: check data 0000002300000022
67958: check data 0000002500000024
67959: check data 0000002700000026
67960: check data 0000002900000028
67961: check data 0000002b0000002a
67962: check data 0000002d0000002c
67963: check data 0000002f0000002e
67964: check data 0000003100000030
67965: check data 0000003300000032
67966: check data 0000003500000034
67967: check data 0000003700000036
67968: check data 0000003900000038
67969: check data 0000003b0000003a
67970: check data 0000003d0000003c
67971: check data 0000003f0000003e
68126: check data 0000004100000040
68127: check data 0000004300000042
68128: check data 0000004500000044
68129: check data 0000004700000046
68130: check data 0000004900000048
68131: check data 0000004b0000004a

support for NetFPGA Sume

I've built connectal from source and installed drivers, fpgajtag. After building Echo example for NetFPGA Sume target, I ran make run.nfsume and received the following error:

fpgajtag: elf input file, len 2170721 class 2
fpgajtag: unzip input file, len 1751914
fpgajtag: Digilent:Digilent USB Device:210301763224; bcd:700
[init_fpgajtag] id 3691093 from file does not match actual id 3410003
subprocess pid 6326 completed status=ff00 255
make[1]: *** [run] Error 255
make: *** [run.nfsume] Error 2

What should I do to resolve it?

build error with netfpga sume

Hi,

I'm trying to build the DDR3 test for nfsume target. The build was failed with the following error. Maybe you forget to check-in some file.

Error: XCI file /opt/connectal/out/nfsume/axiddr3/axiddr3.xci not found
make[1]: *** [fpgamake.mk] Error 255
make: *** [build.nfsume] Error 2

generate xilinx pin constraints from .pkg file

e.g.,

Xilinx/Vivado/2014.4/data/parts/xilinx/zynq/zynq/xc7z020/clg400/clg400_7z020.pkg:

N2 | 148 PS_DDR_A0_502 N2
K2 | 149 PS_DDR_A1_502 K2
M3 | 150 PS_DDR_A2_502 M3
K3 | 151 PS_DDR_A3_502 K3

pcieportal.ko issue

When compiling connectal kernel driver on redhat enterprise linux, the following error happens.

(sonic_proj) [jschuh@worthy-one pcieportal]$ make
md5sum *.c ../../generated/cpp/*.c | grep -v mod.c | sed -f ../../scripts/driver_signature.sed >pcieportal_signature_file.h
make[1]: Entering directory `/usr/src/kernels/3.10.105-<tel:3.10.105-1>1<tel:3.10.105-1>.el6.elrepo.x86_64'
 CC [M]  /home/jschuh/work/cs6410-project/connectal/drivers/pcieportal/pcieportal.o
 Building modules, stage 2.
 MODPOST 1 modules
WARNING: "pcie_get_mps" [/home/jschuh/work/cs6410-project/connectal/drivers/pcieportal/pcieportal.ko] undefined!
WARNING: "pcie_set_mps" [/home/jschuh/work/cs6410-project/connectal/drivers/pcieportal/pcieportal.ko] undefined!
 LD [M]  /home/jschuh/work/cs6410-project/connectal/drivers/pcieportal/pcieportal.ko
make[1]: Leaving directory `/usr/src/kernels/3.10.105-1.el6.elrepo.x86_64'

support multi-FPGA models in bluesim

There are a couple of cases:

  1. Single software/hardware connection, but inter-FPGA connections
  2. Multiple software/hardware connections, and inter-FPGA connections

The FPGA models could be bundled into one instance of Bluesim. This has the advantage that the hardware simulation is deterministic, at least in configuration (1) above. Multiple bluesim processes would run faster on an SMP but would not necessarily be deterministic.

Issue with portalCacheFlush in memcpy example?

Hi Jamey,

In case of memcpy, the program finishes with status 0 (successfully) unlike previously with older images. But when I print the src and dst array in software's done function, some of the locations are overwritten (or initialized as 0). If I initialize, the memory after 'portalCacheFlush' src and dst are initialized properly. Can that be happening because of 'portalCacheFlush'?

Default order for memory initialization in memcpy example:
In this case, some parts of the src and dst array are not initialzed properly.

  srcAlloc = portalAlloc(alloc_sz, 0);
  dstAlloc = portalAlloc(alloc_sz, 0);

  srcBuffer = (unsigned int *)portalMmap(srcAlloc, alloc_sz);
  dstBuffer = (unsigned int *)portalMmap(dstAlloc, alloc_sz);

  for (int i = 0; i < numWords; i++){
     srcBuffer[i] = i;
     dstBuffer[i] = 0x5a5abeef;
  }
  portalCacheFlush(srcAlloc, srcBuffer, alloc_sz, 1);
  portalCacheFlush(dstAlloc, dstBuffer, alloc_sz, 1);

  unsigned int ref_srcAlloc = dma->reference(srcAlloc);
  unsigned int ref_dstAlloc = dma->reference(dstAlloc);

Following modifications in the order solves the issue:

  srcAlloc = portalAlloc(alloc_sz, 0);
  dstAlloc = portalAlloc(alloc_sz, 0);

  srcBuffer = (unsigned int *)portalMmap(srcAlloc, alloc_sz);
  dstBuffer = (unsigned int *)portalMmap(dstAlloc, alloc_sz);

  portalCacheFlush(srcAlloc, srcBuffer, alloc_sz, 1);
  portalCacheFlush(dstAlloc, dstBuffer, alloc_sz, 1);

  unsigned int ref_srcAlloc = dma->reference(srcAlloc);
  unsigned int ref_dstAlloc = dma->reference(dstAlloc);

  for (int i = 0; i < numWords; i++){
     srcBuffer[i] = i;
     dstBuffer[i] = 0x5a5abeef;
  }

Is it possible to support the opensource bsc?

I am trying to use the opensourced version of bluespec compiler together with connectal. However, in order to successfully build the project (generating bluesim executables), I have to make some changes to connectal (connectal.txt).

Building errors are due to directory organization and internal API difference between closesource and opensourced version bsc. So I would like to know if there is any plan for connectal to support the opensourced version, since it seems to be the most accessible one for most people and hopefully Bluespec Inc. will continually maintain the repo.

support ac701

  • ac701 gen1 boardinfo
  • ac701 gen2 boardinfo
  • PCIEWRAPPER2 works with 4 lanes
  • compiles to verilog
  • compiles to bitstream
  • bitstream works

FPGA indication dropped when lots of request/indication traffic?

I'm trying to run one of our Riscy processors on the kc705g2 FPGA target, and I'm running into some weird issues that seem to go away when doing stuff to the executable that will cause it to run slower.

The main issue shows up in a function that loads a program onto the FPGA's BRAM. This function makes many calls to a "memWrite" function. This memWrite function calls a request interface method to send the write request to the FPGA, and then it waits on a semaphore until the FPGA sends back the appropriate indication back.

Without any debugging, our ubuntu.exe program successfully loads the FPGA bitfile and hangs during the function that loads the program onto BRAM on the FPGA.

If I attach gdb to this process while it is stalled, I see that the main thread is waiting for the semaphore in the memWrite function, and the other thread is in the Poll() function.

If I run ubuntu.exe under gdb from the start, ubuntu.exe runs as intended.

If I run ubuntu.exe under strace, it also runs as intended.

If I add c++ print statements to the functions that send the request and receive the indication, ubuntu.exe sometimes stalls while waiting for an indication, but it sometimes works completely. When it stalls, sometimes it's early in the program loading, and sometimes it's late.

I'm not sure what is going on, but it appears that there is some bug that doesn't appear when it ubuntu.exe is running slowly. I'm going to try producing a simple example of this bug and I'll try a bit of debugging on my own.

I'm using version 17.01.2 of connectal + one extra commit that I'll send in a pull request in a couple minutes. On the FPGA machine, I'm using the most recent version of the connectal drivers from the PPA.

debugging.txt has example output from ubuntu.exe when it stalls and the corresponding pcieflat output.

Simple Amazon AWS EC2 F1 example

Hi,

I'm fairly new to the FPGA development stuff, I'm just tying to play around with AWS F1, so I have done

$ cd examples/simple
$ make build.awsf1

the output of the make is in https://gist.github.com/KoviRobi/8316a68ee10dc7e3b22b0298ab6d9339 but let me highlight a couple of lines

  1. grep: /home/rmk35/programming/bluespec/connectal/boardinfo/.json: No such file or directory, perhaps a bug in Makefile.connectal, or I'm doing something wrong? There is an boardinfo/awsf1.json
  2. Do I need quartus/vivado/vsim? I was just hoping to do the gen on my machine, and the synthesise on the Amazon FPGA Developer AMI.
  3. make[1]: *** No rule to make target 'obj/Vector.bo', needed by 'obj/AwsF1Top.bo'. Stop. I guess it's looking for the Vector.bo shipped with bluespec, which with the bluespec installed with the Nix package manager is /nix/store/2vxm66aq8f580x90z6nwc4iglm3ahijh-bluespec-unstable-2020.02.09/lib/Libraries/Vector.bo in this instance, but this path (specifically the hash in /nix/store/<hash>-<name>) will change with different versions of bsc so should definitely not be hardcoded.

Bypass version mismatch problems in generated Makefile

Hello,
Is there a way in connectal, where i don't check files for their versions, and build directly with bsc compiler.(Hopefully a place to decide whether to insert -u flag or not).
Incidentally, I have some previously compiled .bo files(unfortunately their source files are not available.) which are required. Now if i run connectal directly, It does a version check and throws error stating that binary versions doesn't match, need to recompile. Is there a way to solve this problem.
Attached log files.
log.txt

Support 256-bit DataBusWidth in PCIe

  • Support gen3 core completer interface
  • Support gen3 core requester interface up to 128 bits
  • Extend MemToPcie to 256 bits
  • Extend gen3 core requester interface to 256 bits
  • Merge back to master

DDR3 Test doesn't do anything

Hi Jamey,

I'm able to build the tests/ddr3 but I observe that the test doesn't do anything. The test is wrapped in an IF statement which never fires.

https://github.com/cambridgehackers/connectal/blob/master/tests/ddr3/testddr3.cpp#L56
I've removed the ``if'' to see how it works. The program just hangs forever.

I would like to read and write to DDR3 but it's difficult to follow the test. It's great if you could help me to rewrite the test or an example to use DDR3 with Connectal.

Adding Connectal Support to DE5 Net Board

I have started using Bluespec and I am really awed by the change in paradigm I am having writing HDL. So I have a project in which I plan to use Bluespec, however the board I have is an Altera DE5 Net board, if I wanted to add support to the board what are the steps I have to do?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.