Simulated consciousness, synthetic consciousness, etc. is a theme of a number of works in science fiction. The theme is one step beyond the concept of the "brain in a vat"/"simulated reality" in that not only the perceived reality but the brain and its consciousness are simulations themselves.
Stanislaw Lem's professor Corcoran (met by Ijon Tichy during his interstellar travels, first published by Lem in 1961[1]) simulated conscious agents (personoids) to actually test the viability of the "simulation hypothesis" of the reality, i.e., the idea of solipsism.[2]
In the 1954 story The Tunnel under the World by Frederik Pohl, a whole city was simulated in order to run tests of the efficiency of advertising campaigns, and the plot evolves from the point when one "simulacrum" suddenly notices that every day is June 15.[3] Pohl's idea was elaborated in Simulacron-3 (1964) by Daniel F. Galouye (alternative title: Counterfeit World), which tells the story of a virtual city developed as a computer simulation for market research purposes. In this city the simulated inhabitants possess consciousness; all but one of the inhabitants are unaware of the true nature of their world.[4]
Furthermore, various novels by Greg Egan such as Permutation City (1994), Diaspora (1997) and Schild's Ladder (2002) explore the concept of simulated consciousness.[5]