Skip to content
This repository has been archived by the owner on Jul 17, 2023. It is now read-only.

DESim VPI source code #24

Open
dlly11 opened this issue Apr 24, 2021 · 3 comments
Open

DESim VPI source code #24

dlly11 opened this issue Apr 24, 2021 · 3 comments

Comments

@dlly11
Copy link

dlly11 commented Apr 24, 2021

Hi,

Is there any chance of uploading the VPI source code in the hardware simulator: https://github.com/intel/FPGA-Devcloud/tree/master/main/HandsFree/Simulator/DESim

We would like to make the simulator compatible for students on Linux.

Thanks

@llandis
Copy link
Contributor

llandis commented Apr 27, 2021

Hi!
refer to the DESim link again - I add a github repo location in the READme where you can find the source code. If you would like to contribute a Linux release, please use the issues on the fpgacademy site and we would be thrilled to get some outside help.
Thanks
Larry

@llandis
Copy link
Contributor

llandis commented May 3, 2021

Did the link above help you get what you need to port DESim to Linux?
Thanks!
Larry

@dlly11
Copy link
Author

dlly11 commented May 4, 2021

Did the link above help you get what you need to port DESim to Linux?
Thanks!
Larry

Hi,

Yes I was able to get it to work. I haven't had time to test all of the demo programs.
To get it to work, in the C header files wherever saw:
`ifdef _WIN32
#include <winsock2.h>
#include <Ws2tcpip.h>
typedef SOCKET sockfd;

#else
typedef int sockfd;
#endif`

I modified to:
`ifdef _WIN32
#include <winsock2.h>
#include <Ws2tcpip.h>
typedef SOCKET sockfd;

#else
#include <sys/socket.h> // New Line
typedef int sockfd;
#endif`

I also modified the makefile from:
`
MODELSIM_DIR = C:\intelFPGA\19.1\modelsim_ae

CFLAGS = -m32 -static -c -Wall -g -fno-diagnostics-show-caret -fpic -Iinclude -I$(MODELSIM_DIR)/include
LDFLAGS = -m32 -static -g -shared -lmtipli

ifeq ($(OS),Windows_NT)
LDFLAGS += -lws2_32
LDFLAGS += -L$(MODELSIM_DIR)/win32aloem
endif`

to :
`
ifeq ($(OS),Windows_NT)
MODELSIM_DIR = C:\intelFPGA\19.1\modelsim_ae

else
MODELSIM_DIR = ~/intelFPGA/19.1/modelsim_ae
endif`

CFLAGS = -m32 -static -c -Wall -g -fno-diagnostics-show-caret -fpic -Iinclude -I$(MODELSIM_DIR)/include

ifeq ($(OS),Windows_NT)
LDFLAGS = -m32 -static -g -shared -lmtipli
LDFLAGS += -lws2_32
LDFLAGS += -L$(MODELSIM_DIR)/win32aloem

else
LDFLAGS = -m32 -static -g -shared -Llib/mtipli
LDFLAGS += -L$(MODELSIM_DIR)/win32aloem
endif`

After following the instructions in the READMEs, compiling with make and running the demos worked fine.
If there is a better way to do any of that please let me know

Thanks
-David

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants