The only way to guarantee that no DRAM gets used by your program is to make sure that the computer running your program uses some other kind of RAM modules.
Unless you have a severely underpowered processor in your system, such that 100% CPU time is required to copy bytes between modules on the PCIe bus, your program will spend part of the time waiting for data to arrive (and on a fast processor, it might be the majority of the time).
While your program is waiting for data, the processor will go off and do other things. During that time, your program has to exist somewhere and that can't be cache, because there is no mechanism to tell the processor that certain unused cache lines may not be removed. After all, cache is just an optimization in the processor to let it run faster than the memory bus can keep up with if every word has to be retrieved separately.
So, if your program can't stay in cache while waiting, you would want it in the next fastest place, so that you have the least amount of delay when the data it was waiting for arrives. That place happens to be the RAM of the computer.