The perception of the Roman Empire throughout the Middle Ages is a very interesting subject. First, the Roman Empire was never "forgotten" - the various Gothic kings, upon taking over the various parts of the Western Roman Empire, kept Roman law in place and legally owed fealty to the Emperor in Constantinople. I remember reading in John Julius Norwich's Byzantium trilogy that the average person living at the time would not have had any concept of the Roman Empire falling when Romulus Augustulus abdicated.
I'd say that the idea of "Romanness" as a form of identity was probably forgotten within a few generations, at least outside of Rome and/or Italy. People who were born and died under a Gothic King rather than a Roman Emperor would probably have some knowledge of "the Roman Empire" but it would have meant very little to them. At the very least, they probably would have known that the Emperor lived in Constantinople. Over time, their perception of the Emperor would sour as he became more "oriental" and spoke Greek rather than Latin, until the Emperor was regarded as entirely foreign and not Roman at all.
By the time of Charlemagne, the people living in the former Western Roman Empire would have had little concept that they were "Romans", instead basing their identity on their Christian faith and their allegiance to their king. That's not to say that the Roman Empire was forgotten, but that it was firmly in the past. Some who were more well-acquainted with Byzantium may have had some understanding that the Emperors in Constantinople had a direct lineage from Rome, but this would have been ignored further away from the Byzantine Empire due to the perceived "foreignness" of the Empire, their inability to reach places like Spain, France, and Britain, and their rather tyrannical rule in Italy as foreign occupiers.
After Charlemagne, from what I understand the Roman Empire became more associated with Charlemagne himself, and to some, the term became synonymous with "powerful Christian state". A state that claimed total hegemony over the Christian world would be considered "the Roman Empire", regardless of whether the actual city of Rome was a part of that state. Controlling Italy was initially a priority in the case of Otto the Great, but afterwards "Roman Emperor" was a legal title conferred by the Catholic Church, symbolizing the highest political rule in Christendom. Of course, this diminished after the Investiture Controversy as the Holy Roman Emperor clearly could not claim to be temporal and ecclesiastical leader of the Christian world.
This is all from a Western European perspective, of course. To the Byzantines, who called themselves Romans, the Roman Empire never fell and was never forgotten, and people as far away as India, Mongolia, and China would speak of a powerful state to the west called Rome when they were in fact referring to the Byzantine Empire. And as we all know, the Turks named the land they conquered "Rum", perceiving that they had conquered Roman land.