OpenCores
no use no use 1/3 Next Last
MB-Lite
by tribbiani on Jun 1, 2016
tribbiani
Posts: 26
Joined: Mar 2, 2016
Last seen: Nov 14, 2022
Hi! I am using MB-Lite in my project. The project is copied to my folder: C:\Users\Einstein\Documents\VHDL_MasterThesis\MB-Lite\mblite\trunk\designs\core

I am trying to follow the instructions from the Thesis from Kranenburg. C.1 Hardware Development Manual C.1.1 Quick start guide To simulate a design using ModelSim...

Software used are win7 64-bit, ISE-64 bit og ISE Design Suite 64 Bit Command Prompt.

"Go to one of the design directories in (mblite/designs/core*), and type:
%> make all"
From ISE cmd 64 shell i type "xtclsh Makefile all" but get error message:

xtclsh Makefile all
invalid command name "TOP_LEVEL_DIR=../.."
while executing
"TOP_LEVEL_DIR=../.. "
(file "Makefile" line 1)

The Makefile is attached.
Does anybody have some ideas why this is happening?

Regards tribbiani!


Makefile (3 kb)
RE: MB-Lite
by dgisselq on Jun 1, 2016
dgisselq
Posts: 247
Joined: Feb 20, 2015
Last seen: Jul 15, 2022
Don't run the "make all" file from within the ISE command shell.

It's not clear from the thesis whether or not the original build was done from within a Linux or a Windows environment, so it's hard to know if you will be successful in Windows. For now, why not try pulling up a shell (not within ISE), changing to the appropriate directory, and then typing the listed command?

Dan

RE: MB-Lite
by tribbiani on Dec 7, 2016
tribbiani
Posts: 26
Joined: Mar 2, 2016
Last seen: Nov 14, 2022
Hello! I have now worked out some of the software problems with regards to MB-Lite. Hello world was successfully simulated with Modelsim PeStudent edition. Since I am using windows 7 I added all the necessary files to the project manually. I do think if you use Linux environment the makefile included in hello world project will automate this process.


For the MB-Lite I have created external wishbone compatible memory. The challenge is now how to connect it to the MB-Lite. In my design you have the core and core_wb adapter for communication with external memory. In jpg attached RTL description of the circuit is provided.

What I am trying to do is to connect Wrapper_Block_RAM to core_wb_adapter. I have replaced the main signals wb_o and wb_i from core_wb_adapter with signals for testing. This means wb_o and wb_i from core_wb_adapter does not propagate up in the design hierarchy and to main entity. The problem I faced when connecting wb_o in core_wb_adapter to Wrapper_Block_RAM is that wb_o is an output signal in the top entity and i violate hdl design rules if i try to route this signal back in to Wrapper_Block_RAM.

The use of buffer is mentioned to avoid this problem, is buffer the preferred way to solve this problem ?

Regards
RE: MB-Lite
by kuzmi4 on Dec 7, 2016
kuzmi4
Posts: 45
Joined: Aug 1, 2008
Last seen: Nov 3, 2021
Hi tribbiani

..In jpg attached RTL description of the circuit is provided..

jpg??

-> works fine:

library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;

library mblite;
use mblite.config_Pkg.all;
use mblite.core_Pkg.all;
use mblite.std_Pkg.all;

entity mblite_unit is port
...
-- WB-master inputs from the wb-slaves
wbm_dat_i : in std_logic_vector(CFG_DMEM_WIDTH - 1 downto 0); -- databus input
wbm_ack_i : in std_logic; -- buscycle acknowledge input
-- WB-master outputs to the wb-slaves
wbm_adr_o : out std_logic_vector(CFG_DMEM_SIZE - 1 downto 0); -- address bits
wbm_dat_o : out std_logic_vector(CFG_DMEM_WIDTH - 1 downto 0); -- databus output
wbm_we_o : out std_logic; -- write enable output
wbm_stb_o : out std_logic; -- strobe signals
wbm_sel_o : out std_logic_vector(CFG_DMEM_WIDTH/8 - 1 downto 0); -- select output array
wbm_cyc_o : out std_logic -- valid BUS cycle output
...
wbm_adr_o wbm_dat_o wbm_we_o wbm_stb_o wbm_sel_o wbm_cyc_o m_wb_i.dat_i m_wb_i.ack_i m_wb_i.int_i m_wb_i.clk_i m_wb_i.rst_i ...
wb_adapter : core_wb_adapter
port map
(
dmem_i => s_dmem_i(1),
wb_o => m_wb_o,
dmem_o => s_dmem_o(1),
wb_i => m_wb_i
);
...
RE: MB-Lite
by kuzmi4 on Dec 7, 2016
kuzmi4
Posts: 45
Joined: Aug 1, 2008
Last seen: Nov 3, 2021
..looks like something is wrong with tags..
RE: MB-Lite
by tribbiani on Dec 7, 2016
tribbiani
Posts: 26
Joined: Mar 2, 2016
Last seen: Nov 14, 2022
This is the original RTL design of MB-Lite with wishbone adapter.

RE: MB-Lite
by tribbiani on Dec 7, 2016
tribbiani
Posts: 26
Joined: Mar 2, 2016
Last seen: Nov 14, 2022
This is RTL view with memory module inserted. I am not sure if you are able to open the pictures.
RE: MB-Lite
by tribbiani on Dec 7, 2016
tribbiani
Posts: 26
Joined: Mar 2, 2016
Last seen: Nov 14, 2022
Ok! No pictures! Attached are the top entity of MB-Lite and the core_wb_adapter entity.

I am either creating the buffer in a wrong way or violating the rule of VDHL 93, where buffering of a port of mode out updated by several signals is no accepted[1].





[1] https://books.google.de/books?id=tWkfoAiXpuYC&pg=PA17&lpg=PA17&dq=difference+inout+buffer&source=bl&ots=8RWd720Q86&sig=3u26Lv8kB5kOSzPuj570DjfDS9I&hl=en&sa=X&ei=umMGUbeBH4vMswb934HYBw#v=onepage&q=difference%20inout%20buffer&f=false

Regards
RE: MB-Lite
by kuzmi4 on Dec 7, 2016
kuzmi4
Posts: 45
Joined: Aug 1, 2008
Last seen: Nov 3, 2021
2 tribbiani:
no, no images at all.

Like a temporary solution you can use a link to external image storage service..
RE: MB-Lite
by tribbiani on Dec 8, 2016
tribbiani
Posts: 26
Joined: Mar 2, 2016
Last seen: Nov 14, 2022
Thanks!

So my question is what attachment-types are allowed to upload in this forum?

Regards
RE: MB-Lite
by tribbiani on Dec 12, 2016
tribbiani
Posts: 26
Joined: Mar 2, 2016
Last seen: Nov 14, 2022
Thank you for the example! It pointed me in the right direction.

Since I will use several slaves connected to MB-Lite, the address-decoder is needed.
DMEM will be connected directly to address-decoder, and each wishbone slave will be connected to a wishbone adapter who are then connected to the address-decoder.

Will give you some feedback when it is implemented.

Regards
tribbiani
RE: MB-Lite
by tribbiani on Jan 31, 2017
tribbiani
Posts: 26
Joined: Mar 2, 2016
Last seen: Nov 14, 2022
Hi! Now address-decoder is implemented and connected to datamem and wishbone adapter.
I did use the core generator to create instruction-memory and data-memory.

So the MB-Lite consist of core, imem, datamem, core_address_decoder,core_wb_adapter.

For data-memory the byte select sel_o from address-decoder was connected to wre(i). For writing to data-mem it seems fine, but for reading I created logic that replaces wre(i) with value 0b0000. RAM module is write mode and requires wre(i) to be set to all zero for reading from memory. Did some of you solve this in a different fashion?

From synthesizing and implementation there are to much optimizing. Missing initial values in the instruction register.

I have not yet initialized imem and datamem....! Maybe that is the reason?
Will consider to use data2mem for initialize memory, some ideas?

Best regards!
RE: MB-Lite
by kuzmi4 on Feb 6, 2017
kuzmi4
Posts: 45
Joined: Aug 1, 2008
Last seen: Nov 3, 2021
Hi tribbiani,

Actually all you need (address-decoder) already located in MB-Lite project. WB example project in "MB-Lite" contains example for WB:
../mblite\trunk\designs\core_decoder_wb\testbench.vhd
In accordance to your compiled SW code (linker script), you must initialize "imem" + "dmem".
Use:
../mblite\trunk\sw\utils
to make all INI-files for "imem" + "dmem".
Without these INI-files for memories, you will have a lot of optimizations in Vivado.
RE: MB-Lite
by tribbiani on Feb 23, 2017
tribbiani
Posts: 26
Joined: Mar 2, 2016
Last seen: Nov 14, 2022
Thank you kuzmi4! This will be interesting will try it out today.

So do you think the logic for reading datamem was unnecessary? I did it because I was not sure if sel_0 from address_decoder would work if directly connected to datamem wre_i(3..0) for byte addressable writes.

Did change datamem memory type from WRITE-FIRST to READ-FIRST. The reason for this is write first mode does not support byte write enables used in MB-Lite [1].

Was able to get BRAM instance name for memory IMEM and DATAMEM, may be used with data2mem:

IMEM0/IMEM_ROM/N1 | NONE(IMEM0/IMEM_ROM/U0/xst_blk_mem_generator/gnative_mem_map_bmg.native_mem_map_blk_mem_gen/valid.cstr/ramloop[0].ram.r/s6_init.ram/SP.SIMPLE_PRIM18.ram) | 1 |

sram_4en0/sram_4EN_datamem/N1 | NONE(sram_4en0/sram_4EN_datamem/U0/xst_blk_mem_generator/gnative_mem_map_bmg.native_mem_map_blk_mem_gen/valid.cstr/ramloop[0].ram.r/s6_init.ram/SP.SIMPLE_PRIM18.ram)| 1

regards tribbiani

--------------------------------------------------------------
Sources:
[1]LogiCORE IP Block Memory Generator v7.3
RE: MB-Lite
by kuzmi4 on Feb 24, 2017
kuzmi4
Posts: 45
Joined: Aug 1, 2008
Last seen: Nov 3, 2021
Hi tribbiani,

Read logic for "dmem" is important: "dmem" is a holder of DATA-part of the SW code, so you need READ-port and WRITE-port, + data init via MEM-files.
/imem" - instructions, so you need only READ-port, + data init via MEM-files /

Also I can not understand why you need "LogiCORE IP Block Memory Generator" for "imem"+"dmem"? You can simply use "../trunk/hw/std/sram.vhd" and "../trunk/hw/std/sram_4en.vhd" -> works fine for Vivado 2015.4
no use no use 1/3 Next Last
© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.