The Xilinx ISE toolset allows you to add logic blocks created with the Core Generator. These logic blocks can be instantiated in your design. However, they are not readily available to simulate in ModelSim. To simulate elements such as BRAMs or multipliers, follow the steps below to create a CoreGen wrapper file and compile the CoreGen libraries to run on ModelSim.
Implement a multiplier in CoreGen. For this example, I made a parallel
multiplier with two 8-bit signed inputs (non-registered) and a single 16-bit
registered output. I also chose minimum pipelining so the output latency is
only one cycle.
Line 22 loads the CoreGen library file that was created above
Line 23 compiles the three verilog source files (note that paul_bram.v was
generated by coregen)
Line 24 loads the modules into the simulator
Line 25 runs the modules
The testbench file includes the line "`timescale 1ns/10ps" that ensures all the simulation delay times are correlated. We are not using that feature and its only there to keep down some warnings in Modelsim.