Forum Discussion
Altera_Forum
Honored Contributor
15 years agoHello Dave,
Thank you for your quick response Dave. Yes, I have written simple programs [test_program.sv] for simple systems. [These systems have no bus. I am just writing to an on-chip RAM. In the first layer/level, I only have a ram, a clock and a reset. Next I export the slave of RAM [the default name is s1]. The clock and reset are already exported by default. Then I attach clock BFM, reset BFM and Avalon Master BFM to the top level [containing ram and clock] system instance. Later I write a test program containing API's to write data, read etc....]. this works and i can see the written data in the ram.. But I am not using any Bus [such as PCIe/ixp bus] and the connection is through the Avalon switch fabric. system 2: Now, when I include the bus [I am using a simple expansion bus [ixp]] and when I connect the master of the bus to the slave of the RAM, here are the difficulties I face: a) How do I use the BFM to write data [I want to use the API's for the Avalon Master BFM given in the API manual] to the RAM [remember the master of the BUS is connected to the slave of the RAM]. Since the mater of the BUS is connected to the slave of the RAM, I cannot export the RAM's slave pin because, then the connection between the bus.master and ram.slave gets disconnected. So the only thing I can do is to drive the slave of the BUS. But when I drive the slave of the BUS using Avalon MM BFM, I can only write to the memory locations of the slave of the bus using the API's, my big question is : "how do i access the memory locations of the ram", with a bus ip between Avalon MM master BFM and the on chip RAM my questions after trying to implement system 2[above] The reason why I am trying to implement the above system is, I read in the tutorials that in order to test a system, you need to export some of the pins to which you apply the stimulus using the BFM's. questions a) Is it even possible to implement such a system [like what I am trying to do above] b) Is it necessary to test the systems only using BFM's? c) Based on what I know, if you want to test any system in Qsys you need to export the signals right? without exporting you cannot test anything right? d) Am I supposed to use APIs' only to test individual components and not the entire system? I have tried to explain things as clearly as possible, If I still haven't explained the problem clearly, I will explain it one more time with some screen shots. Thanks a lot for you time and effort, Aditya